Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/0.17.0/
Date: Tue, 26 Apr 2016 07:15:18
Message-Id: 1461654031.f912e4c68f167b32fdd41994a65eaebb0f4bd46b.monsieurp@gentoo
1 commit: f912e4c68f167b32fdd41994a65eaebb0f4bd46b
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Mon Apr 25 19:20:36 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 07:00:31 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f912e4c6
7
8 media-video/mpv: revbump to 0.17.0-r2 to make users aware of mpv-bash-completion
9
10 Backport a couple more fixes on the way.
11
12 Closes: https://github.com/gentoo/gentoo/pull/1350
13 Package-Manager: portage-2.2.28
14
15 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
16
17 .../0.17.0/mpv-0.17.0-fix-early-audio-start.patch | 48 ++++++++++++++++++++++
18 .../mpv-0.17.0-fix-unselecting-video-track.patch | 23 +++++++++++
19 .../{mpv-0.17.0-r1.ebuild => mpv-0.17.0-r2.ebuild} | 15 +++++++
20 3 files changed, 86 insertions(+)
21
22 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
23 new file mode 100644
24 index 0000000..f7685d8
25 --- /dev/null
26 +++ b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-early-audio-start.patch
27 @@ -0,0 +1,48 @@
28 +commit cd9ee1a8533a3d5fb4c163802347e83c7db91923
29 +Author: wm4 <wm4@nowhere>
30 +Date: Wed Apr 20 13:05:29 2016 +0200
31 +
32 +player: really start audio only once video is ready
33 +
34 +The check whether video is ready yet was done only in STATUS_FILLING.
35 +But it also switched to STATUS_READY, which means the next time
36 +fill_audio_out_buffers() was called, audio would actually be started
37 +before video.
38 +
39 +In most situations, this bug didn't show up, because it was only
40 +triggered if the demuxer didn't provide video packets quickly enough,
41 +but did for audio packets.
42 +
43 +Also log when audio is started.
44 +
45 +(I hate fill_audio_out_buffers(), why did I write it?)
46 +---
47 +
48 +diff --git a/player/audio.c b/player/audio.c
49 +index 3a2c60b..2ce1669 100644
50 +--- a/player/audio.c
51 ++++ b/player/audio.c
52 +@@ -886,13 +886,18 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
53 +
54 + assert(mpctx->audio_status >= STATUS_FILLING);
55 +
56 ++ // We already have as much data as the audio device wants, and can start
57 ++ // writing it any time.
58 ++ if (mpctx->audio_status == STATUS_FILLING)
59 ++ mpctx->audio_status = STATUS_READY;
60 ++
61 + // Even if we're done decoding and syncing, let video start first - this is
62 + // required, because sending audio to the AO already starts playback.
63 +- if (mpctx->audio_status == STATUS_FILLING && mpctx->vo_chain &&
64 +- !mpctx->vo_chain->is_coverart && mpctx->video_status <= STATUS_READY)
65 +- {
66 +- mpctx->audio_status = STATUS_READY;
67 +- return;
68 ++ if (mpctx->audio_status == STATUS_READY) {
69 ++ if (mpctx->vo_chain && !mpctx->vo_chain->is_coverart &&
70 ++ mpctx->video_status <= STATUS_READY)
71 ++ return;
72 ++ MP_VERBOSE(mpctx, "starting audio playback\n");
73 + }
74 +
75 + bool audio_eof = status == AD_EOF;
76
77 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
78 new file mode 100644
79 index 0000000..e394b82
80 --- /dev/null
81 +++ b/media-video/mpv/files/0.17.0/mpv-0.17.0-fix-unselecting-video-track.patch
82 @@ -0,0 +1,23 @@
83 +commit 47e7676e7e1d39bf8bcd5fa623698f383a60712e
84 +Author: wm4 <wm4@nowhere>
85 +Date: Sat Apr 23 17:24:03 2016 +0200
86 +
87 +player: force VO reconfig when unselecting video track
88 +
89 +Switches to a black window if --force-window is used while coverart
90 +"video" is playing.
91 +---
92 +
93 +diff --git a/player/loadfile.c b/player/loadfile.c
94 +index 4890245..2b88ecf 100644
95 +--- a/player/loadfile.c
96 ++++ b/player/loadfile.c
97 +@@ -452,7 +452,7 @@ void mp_switch_track_n(struct MPContext *mpctx, int order, enum stream_type type
98 + if (type == STREAM_VIDEO) {
99 + uninit_video_chain(mpctx);
100 + if (!track)
101 +- handle_force_window(mpctx, false);
102 ++ handle_force_window(mpctx, true);
103 + } else if (type == STREAM_AUDIO) {
104 + clear_audio_output_buffers(mpctx);
105 + uninit_audio_chain(mpctx);
106
107 diff --git a/media-video/mpv/mpv-0.17.0-r1.ebuild b/media-video/mpv/mpv-0.17.0-r2.ebuild
108 similarity index 92%
109 rename from media-video/mpv/mpv-0.17.0-r1.ebuild
110 rename to media-video/mpv/mpv-0.17.0-r2.ebuild
111 index 446f818..94e672e 100644
112 --- a/media-video/mpv/mpv-0.17.0-r1.ebuild
113 +++ b/media-video/mpv/mpv-0.17.0-r2.ebuild
114 @@ -132,9 +132,11 @@ PATCHES=(
115 "${FILESDIR}/${PV}/${P}-remove-unneeded-X11-include.patch"
116 "${FILESDIR}/${PV}/${P}-add-missing-math-include.patch"
117 "${FILESDIR}/${PV}/${P}-fix-parsing-multiple-input-command-prefixes.patch"
118 + "${FILESDIR}/${PV}/${P}-fix-early-audio-start.patch"
119 "${FILESDIR}/${PV}/${P}-avoid-deprecated-API-usage.patch"
120 "${FILESDIR}/${PV}/${P}-fix-hwdec-fallback.patch"
121 "${FILESDIR}/${PV}/${P}-fix-relative-seeking-with-coverart.patch"
122 + "${FILESDIR}/${PV}/${P}-fix-unselecting-video-track.patch"
123 "${FILESDIR}/${PV}/${P}-fix-video-frame-info-memleak.patch"
124 )
125
126 @@ -278,6 +280,19 @@ pkg_preinst() {
127 pkg_postinst() {
128 fdo-mime_desktop_database_update
129 gnome2_icon_cache_update
130 +
131 + # bash-completion prior to 2.3-r1 installs (mostly broken) mpv completion.
132 + if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
133 + ! has_version 'app-shells/mpv-bash-completion'; then
134 + elog "If you want to have command-line completion via bash-completion,"
135 + elog "please install app-shells/mpv-bash-completion."
136 + fi;
137 +
138 + if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
139 + has_version 'app-shells/mpv-bash-completion'; then
140 + elog "If command-line completion doesn't work after mpv update,"
141 + elog "please rebuild app-shells/mpv-bash-completion."
142 + fi;
143 }
144
145 pkg_postrm() {