summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Tumaykin <itumaykin@gmail.com>2016-07-18 01:01:00 +0300
committerPatrice Clement <monsieurp@gentoo.org>2016-07-25 15:03:08 +0200
commit8acfe6db0f4025b2661cf4cc0f97d56f61089a06 (patch)
tree6899f8d97e0defbafb0e43509145eb9635e28028 /media-video/mpv/files
parentmedia-video/mpv: warn re softvol, non-fatal ffmpeg version check in 9999 (diff)
downloadgentoo-8acfe6db0f4025b2661cf4cc0f97d56f61089a06.tar.gz
gentoo-8acfe6db0f4025b2661cf4cc0f97d56f61089a06.tar.bz2
gentoo-8acfe6db0f4025b2661cf4cc0f97d56f61089a06.zip
media-video/mpv: verbump to 0.18.1
Gentoo-Bug: 588492 Package-Manager: portage-2.3.0 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'media-video/mpv/files')
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-fix-audio-uninit-crash.patch39
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-fix-doc-build.patch23
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-fix-high-CPU-on-wayland.patch34
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-fix-stuck-volume-on-pulseaudio.patch32
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-handle-ffmpeg-ABI-changes.patch69
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-respect-deinterlace-auto.patch38
-rw-r--r--media-video/mpv/files/0.18.1/mpv-0.18.1-show-osd-with-ao-volume.patch46
7 files changed, 281 insertions, 0 deletions
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-audio-uninit-crash.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-audio-uninit-crash.patch
new file mode 100644
index 000000000000..8300d4b2311b
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-audio-uninit-crash.patch
@@ -0,0 +1,39 @@
+commit 79974e7ad94e7658c780e3b446a7822a533675e4
+Author: wm4 <wm4@nowhere>
+Date: Fri Jul 15 23:11:25 2016 +0200
+
+audio: fix crashes due to broken uninit check
+
+Since mixer->ao is always NULL now (it was really just forgotten to be
+removed), the uninit call never actually cleared the af field, leaving
+a dangling pointer that could be accessed by volume control.
+
+diff --git a/audio/mixer.c b/audio/mixer.c
+index a58a814..795edfa 100644
+--- a/audio/mixer.c
++++ b/audio/mixer.c
+@@ -23,7 +23,6 @@
+ #include <libavutil/common.h>
+
+ #include "config.h"
+-#include "audio/out/ao.h"
+ #include "audio/filter/af.h"
+ #include "common/global.h"
+ #include "common/msg.h"
+@@ -33,7 +32,6 @@
+ struct mixer {
+ struct mp_log *log;
+ struct MPOpts *opts;
+- struct ao *ao;
+ struct af_stream *af;
+ // Other stuff
+ float balance;
+@@ -145,8 +143,5 @@ void mixer_reinit_audio(struct mixer *mixer, struct af_stream *af)
+ */
+ void mixer_uninit_audio(struct mixer *mixer)
+ {
+- if (!mixer->ao)
+- return;
+-
+ mixer->af = NULL;
+ }
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-doc-build.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-doc-build.patch
new file mode 100644
index 000000000000..26c8f72d4dae
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-doc-build.patch
@@ -0,0 +1,23 @@
+commit 4a4a9f330281ad11eb39a013bf7308063767bab8
+Author: Martin Herkt <lachs0r@srsfckn.biz>
+Date: Fri Jul 15 12:57:12 2016 +0200
+
+man: fix PDF build error
+
+ReportLab really doesn’t like breaking inline literals, so insert an
+explicit line break.
+
+Fixes #3338
+
+diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
+index 9a251ae..74d17a6 100644
+--- a/DOCS/man/options.rst
++++ b/DOCS/man/options.rst
+@@ -588,6 +588,7 @@ Video
+ :videotoolbox: requires ``--vo=opengl`` (OS X 10.8 and up only)
+ :videotoolbox-copy: copies video back into system RAM (OS X 10.8 and up only)
+ :dxva2: requires ``--vo=opengl:backend=angle`` or
++
+ ``--vo=opengl:backend=dxinterop`` (Windows only)
+ :dxva2-copy: copies video back to system RAM (Windows only)
+ :d3d11va: requires ``--vo=opengl:backend=angle`` (Windows only)
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-high-CPU-on-wayland.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-high-CPU-on-wayland.patch
new file mode 100644
index 000000000000..b558da34f699
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-high-CPU-on-wayland.patch
@@ -0,0 +1,34 @@
+commit e11a20a8122b370b66235284dd4f67ce1f1bbc0b
+Author: Rostislav Pehlivanov <atomnuker@gmail.com>
+Date: Tue Jul 19 03:00:03 2016 +0100
+
+vo_wayland: fix high CPU usage due to busy polling
+
+There's no need to call wl_display_flush() since all the client-side
+buffered data has already been flushed prior to polling the fd.
+Instead only check for POLLIN and the usual ERR+HUP.
+
+diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
+index 0e44ddd..6861c93 100644
+--- a/video/out/wayland_common.c
++++ b/video/out/wayland_common.c
+@@ -1106,7 +1106,7 @@ static int vo_wayland_poll (struct vo *vo, int timeout_msecs)
+
+ struct pollfd fd = {
+ wl->display.display_fd,
+- POLLIN | POLLOUT | POLLERR | POLLHUP,
++ POLLIN | POLLERR | POLLHUP,
+ 0
+ };
+
+@@ -1125,8 +1125,8 @@ static int vo_wayland_poll (struct vo *vo, int timeout_msecs)
+ }
+ if (fd.revents & POLLIN)
+ wl_display_dispatch(dp);
+- if (fd.revents & POLLOUT)
+- wl_display_flush(dp);
++ else
++ wl_display_dispatch_pending(dp);
+ }
+
+ return polled;
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-stuck-volume-on-pulseaudio.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-stuck-volume-on-pulseaudio.patch
new file mode 100644
index 000000000000..8d77687e27ca
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-fix-stuck-volume-on-pulseaudio.patch
@@ -0,0 +1,32 @@
+commit d191d76e52a992840ab614f760f1189391a5507d
+Author: wm4 <wm4@nowhere>
+Date: Thu Jul 14 18:11:14 2016 +0200
+
+ao_pulse: fix some volume control rounding issues
+
+Volume could get easily "stuck" or making too huge steps when doing
+things like "add ao-volume 1".
+
+diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c
+index d553b67..fc0dd0d 100644
+--- a/audio/out/ao_pulse.c
++++ b/audio/out/ao_pulse.c
+@@ -23,6 +23,7 @@
+ #include <stdbool.h>
+ #include <string.h>
+ #include <stdint.h>
++#include <math.h>
+ #include <pthread.h>
+
+ #include <pulse/pulseaudio.h>
+@@ -34,8 +35,8 @@
+ #include "ao.h"
+ #include "internal.h"
+
+-#define VOL_PA2MP(v) ((v) * 100 / PA_VOLUME_NORM)
+-#define VOL_MP2PA(v) ((v) * PA_VOLUME_NORM / 100)
++#define VOL_PA2MP(v) ((v) * 100.0 / PA_VOLUME_NORM)
++#define VOL_MP2PA(v) lrint((v) * PA_VOLUME_NORM / 100)
+
+ struct priv {
+ // PulseAudio playback stream object
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-handle-ffmpeg-ABI-changes.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-handle-ffmpeg-ABI-changes.patch
new file mode 100644
index 000000000000..7c006b8506ae
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-handle-ffmpeg-ABI-changes.patch
@@ -0,0 +1,69 @@
+commit dcfde2934dd7b5401b29d6a604fa3eca1b867d5c
+Author: wm4 <wm4@nowhere>
+Date: Sun Jul 24 19:31:47 2016 +0200
+
+audio: use idiotic FFmpeg ABI rules for public-except-not-public fields
+
+The FFmpeg API is incredibly weird and inconsistent about this. This is
+also a FFmpeg-only issue and nothing like this is in Libav - which
+doesn't really show FFmpeg in a very positive light.
+
+(To make it even worse: this is a full-blown Libav API incompatibility,
+even though this crap was added for Libav ABI-compatibility. It's
+absurd.)
+
+Quoting the FFmpeg header for the AVFrame.channels field:
+
+ /**
+ * number of audio channels, only used for audio.
+ * Code outside libavutil should access this field using:
+ * av_frame_get_channels(frame)
+ * - encoding: unused
+ * - decoding: Read by user.
+ */
+ int channels;
+
+It says "should" not must, and it doesn't even mention
+av_frame_set_channels(). It's also in the section for public fields (not
+below a marker that indicates private fields in a public struct, like
+it's done e.g. in AVCodecContext).
+
+But not using the accessor will cause silent failures on ABI changes.
+The failure that happened due to this code didn't even make it apparent
+what was wrong. So just use the idiotic accessor.
+
+Also harmonize the FFmpeg-cursing in the code. (It's fully justified.)
+
+Fixes #3295.
+
+Note that mpv will still check the exact library version numbers, and
+reject mismatches - to protect itself from such issues in the future.
+
+diff --git a/audio/audio.c b/audio/audio.c
+index 710cc03..4c67a9a 100644
+--- a/audio/audio.c
++++ b/audio/audio.c
+@@ -347,9 +347,9 @@ struct mp_audio *mp_audio_from_avframe(struct AVFrame *avframe)
+ mp_chmap_from_lavc(&lavc_chmap, avframe->channel_layout);
+
+ #if LIBAVUTIL_VERSION_MICRO >= 100
+- // FFmpeg being special again
+- if (lavc_chmap.num != avframe->channels)
+- mp_chmap_from_channels(&lavc_chmap, avframe->channels);
++ // FFmpeg being stupid POS again
++ if (lavc_chmap.num != av_frame_get_channels(avframe))
++ mp_chmap_from_channels(&lavc_chmap, av_frame_get_channels(avframe));
+ #endif
+
+ new->rate = avframe->sample_rate;
+@@ -407,8 +407,8 @@ int mp_audio_to_avframe(struct mp_audio *frame, struct AVFrame *avframe)
+ if (!avframe->channel_layout)
+ goto fail;
+ #if LIBAVUTIL_VERSION_MICRO >= 100
+- // FFmpeg being a stupid POS (but I respect it)
+- avframe->channels = frame->channels.num;
++ // FFmpeg being a stupid POS again
++ av_frame_set_channels(avframe, frame->channels.num);
+ #endif
+ avframe->sample_rate = frame->rate;
+
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-respect-deinterlace-auto.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-respect-deinterlace-auto.patch
new file mode 100644
index 000000000000..63be15ab0580
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-respect-deinterlace-auto.patch
@@ -0,0 +1,38 @@
+commit 8b47e5daa440ed30d8e0aa83287bb7a7c014d2ae
+Author: wm4 <wm4@nowhere>
+Date: Tue Jul 12 19:35:47 2016 +0200
+
+video: respect --deinterlace=auto
+
+--deinterlace=auto is the default, and has the obscure semantics that
+deinterlacing is disabled, unless the user has manually inserted a
+deinterlacing filter.
+
+While in software decoding this doesn't matter, and we will happily
+insert 2 yadif filters (if the user has already added one), or not
+remove the yadif filter (if deinterlacing is disabled, but the user has
+added the filter manually), this is different with hardware deinterlacer
+filters. These support VFCTRL_SET_DEINTERLACE for toggling deinterlacing
+filtering at runtime. It exists mainly for legacy reasons, and possibly
+because it makes switching deinterlacing modes more efficient. It might
+also gives us an entry-point for VO deinterlacing, maybe. For whatever
+reasons this mechanism exists, we still support and use it.
+
+This commit fixes that video.c always used VFCTRL_SET_DEINTERLACE to
+disable deinterlacing, even if --deinterlace=auto was set. Fix this by
+checking the value of the option directly.
+
+diff --git a/player/video.c b/player/video.c
+index 59ce72f..0f324b3 100644
+--- a/player/video.c
++++ b/player/video.c
+@@ -214,7 +214,8 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c)
+ }
+
+ // Make sure to reset this even if runtime deint switching is used.
+- video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){0});
++ if (mpctx->opts->deinterlace >= 0)
++ video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){0});
+
+ if (params.rotate && (params.rotate % 90 == 0)) {
+ if (!(vo_c->vo->driver->caps & VO_CAP_ROTATE90)) {
diff --git a/media-video/mpv/files/0.18.1/mpv-0.18.1-show-osd-with-ao-volume.patch b/media-video/mpv/files/0.18.1/mpv-0.18.1-show-osd-with-ao-volume.patch
new file mode 100644
index 000000000000..dc9f55050d1f
--- /dev/null
+++ b/media-video/mpv/files/0.18.1/mpv-0.18.1-show-osd-with-ao-volume.patch
@@ -0,0 +1,46 @@
+commit c5827387fd9a9c2986992b64382e6dad86f1eb6c
+Author: Uros Vampl <mobile.leecher@gmail.com>
+Date: Sun Jul 10 12:50:58 2016 +0200
+
+audio: show an osd bar when changing ao-volume
+
+also, make the osd msg prettier
+
+diff --git a/player/command.c b/player/command.c
+index 3bca64b..b44e12a 100644
+--- a/player/command.c
++++ b/player/command.c
+@@ -1635,8 +1635,20 @@ static int mp_property_ao_volume(void *ctx, struct m_property *prop,
+ return M_PROPERTY_OK;
+ }
+ case M_PROPERTY_GET_TYPE:
+- *(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_FLOAT};
++ *(struct m_option *)arg = (struct m_option){
++ .type = CONF_TYPE_FLOAT,
++ .flags = M_OPT_RANGE,
++ .min = 0,
++ .max = 100,
++ };
+ return M_PROPERTY_OK;
++ case M_PROPERTY_PRINT: {
++ ao_control_vol_t vol = {0};
++ if (ao_control(ao, AOCONTROL_GET_VOLUME, &vol) != CONTROL_OK)
++ return M_PROPERTY_UNAVAILABLE;
++ *(char **)arg = talloc_asprintf(NULL, "%.f", (vol.left + vol.right) / 2.0f);
++ return M_PROPERTY_OK;
++ }
+ }
+ return M_PROPERTY_NOT_IMPLEMENTED;
+ }
+@@ -4051,7 +4063,11 @@ static const struct property_osd_display {
+ { "volume", "Volume",
+ .msg = "Volume: ${?volume:${volume}% ${?mute==yes:(Muted)}}${!volume:${volume}}",
+ .osd_progbar = OSD_VOLUME },
++ { "ao-volume", "AO Volume",
++ .msg = "AO Volume: ${?ao-volume:${ao-volume}% ${?ao-mute==yes:(Muted)}}${!ao-volume:${ao-volume}}",
++ .osd_progbar = OSD_VOLUME },
+ { "mute", "Mute" },
++ { "ao-mute", "AO Mute" },
+ { "audio-delay", "A-V delay" },
+ { "audio", "Audio" },
+ { "balance", "Balance", .osd_progbar = OSD_BALANCE },