summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Tumaykin <itumaykin@gmail.com>2016-04-25 22:20:36 +0300
committerPatrice Clement <monsieurp@gentoo.org>2016-04-26 07:00:31 +0000
commitf912e4c68f167b32fdd41994a65eaebb0f4bd46b (patch)
treeae35c96d1832b98f5f46cf9daebaa996ca076c87 /media-video
parentapp-shells/mpv-bash-completion: new package (diff)
downloadgentoo-f912e4c68f167b32fdd41994a65eaebb0f4bd46b.tar.gz
gentoo-f912e4c68f167b32fdd41994a65eaebb0f4bd46b.tar.bz2
gentoo-f912e4c68f167b32fdd41994a65eaebb0f4bd46b.zip
media-video/mpv: revbump to 0.17.0-r2 to make users aware of mpv-bash-completion
Backport a couple more fixes on the way. Closes: https://github.com/gentoo/gentoo/pull/1350 Package-Manager: portage-2.2.28 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mpv/files/0.17.0/mpv-0.17.0-fix-early-audio-start.patch48
-rw-r--r--media-video/mpv/files/0.17.0/mpv-0.17.0-fix-unselecting-video-track.patch23
-rw-r--r--media-video/mpv/mpv-0.17.0-r2.ebuild (renamed from media-video/mpv/mpv-0.17.0-r1.ebuild)15
3 files changed, 86 insertions, 0 deletions
diff --git a/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-early-audio-start.patch b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-early-audio-start.patch
new file mode 100644
index 000000000000..f7685d886785
--- /dev/null
+++ b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-early-audio-start.patch
@@ -0,0 +1,48 @@
+commit cd9ee1a8533a3d5fb4c163802347e83c7db91923
+Author: wm4 <wm4@nowhere>
+Date: Wed Apr 20 13:05:29 2016 +0200
+
+player: really start audio only once video is ready
+
+The check whether video is ready yet was done only in STATUS_FILLING.
+But it also switched to STATUS_READY, which means the next time
+fill_audio_out_buffers() was called, audio would actually be started
+before video.
+
+In most situations, this bug didn't show up, because it was only
+triggered if the demuxer didn't provide video packets quickly enough,
+but did for audio packets.
+
+Also log when audio is started.
+
+(I hate fill_audio_out_buffers(), why did I write it?)
+---
+
+diff --git a/player/audio.c b/player/audio.c
+index 3a2c60b..2ce1669 100644
+--- a/player/audio.c
++++ b/player/audio.c
+@@ -886,13 +886,18 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
+
+ assert(mpctx->audio_status >= STATUS_FILLING);
+
++ // We already have as much data as the audio device wants, and can start
++ // writing it any time.
++ if (mpctx->audio_status == STATUS_FILLING)
++ mpctx->audio_status = STATUS_READY;
++
+ // Even if we're done decoding and syncing, let video start first - this is
+ // required, because sending audio to the AO already starts playback.
+- if (mpctx->audio_status == STATUS_FILLING && mpctx->vo_chain &&
+- !mpctx->vo_chain->is_coverart && mpctx->video_status <= STATUS_READY)
+- {
+- mpctx->audio_status = STATUS_READY;
+- return;
++ if (mpctx->audio_status == STATUS_READY) {
++ if (mpctx->vo_chain && !mpctx->vo_chain->is_coverart &&
++ mpctx->video_status <= STATUS_READY)
++ return;
++ MP_VERBOSE(mpctx, "starting audio playback\n");
+ }
+
+ bool audio_eof = status == AD_EOF;
diff --git a/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-unselecting-video-track.patch b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-unselecting-video-track.patch
new file mode 100644
index 000000000000..e394b827c255
--- /dev/null
+++ b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-unselecting-video-track.patch
@@ -0,0 +1,23 @@
+commit 47e7676e7e1d39bf8bcd5fa623698f383a60712e
+Author: wm4 <wm4@nowhere>
+Date: Sat Apr 23 17:24:03 2016 +0200
+
+player: force VO reconfig when unselecting video track
+
+Switches to a black window if --force-window is used while coverart
+"video" is playing.
+---
+
+diff --git a/player/loadfile.c b/player/loadfile.c
+index 4890245..2b88ecf 100644
+--- a/player/loadfile.c
++++ b/player/loadfile.c
+@@ -452,7 +452,7 @@ void mp_switch_track_n(struct MPContext *mpctx, int order, enum stream_type type
+ if (type == STREAM_VIDEO) {
+ uninit_video_chain(mpctx);
+ if (!track)
+- handle_force_window(mpctx, false);
++ handle_force_window(mpctx, true);
+ } else if (type == STREAM_AUDIO) {
+ clear_audio_output_buffers(mpctx);
+ uninit_audio_chain(mpctx);
diff --git a/media-video/mpv/mpv-0.17.0-r1.ebuild b/media-video/mpv/mpv-0.17.0-r2.ebuild
index 446f818d399f..94e672e2cc3d 100644
--- a/media-video/mpv/mpv-0.17.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.17.0-r2.ebuild
@@ -132,9 +132,11 @@ PATCHES=(
"${FILESDIR}/${PV}/${P}-remove-unneeded-X11-include.patch"
"${FILESDIR}/${PV}/${P}-add-missing-math-include.patch"
"${FILESDIR}/${PV}/${P}-fix-parsing-multiple-input-command-prefixes.patch"
+ "${FILESDIR}/${PV}/${P}-fix-early-audio-start.patch"
"${FILESDIR}/${PV}/${P}-avoid-deprecated-API-usage.patch"
"${FILESDIR}/${PV}/${P}-fix-hwdec-fallback.patch"
"${FILESDIR}/${PV}/${P}-fix-relative-seeking-with-coverart.patch"
+ "${FILESDIR}/${PV}/${P}-fix-unselecting-video-track.patch"
"${FILESDIR}/${PV}/${P}-fix-video-frame-info-memleak.patch"
)
@@ -278,6 +280,19 @@ pkg_preinst() {
pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
+
+ # bash-completion prior to 2.3-r1 installs (mostly broken) mpv completion.
+ if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
+ ! has_version 'app-shells/mpv-bash-completion'; then
+ elog "If you want to have command-line completion via bash-completion,"
+ elog "please install app-shells/mpv-bash-completion."
+ fi;
+
+ if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
+ has_version 'app-shells/mpv-bash-completion'; then
+ elog "If command-line completion doesn't work after mpv update,"
+ elog "please rebuild app-shells/mpv-bash-completion."
+ fi;
}
pkg_postrm() {