summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-20 00:43:42 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2017-12-21 19:45:32 +0100
commit3412c1a1aa609a580150925aa28a8de0f10d8ef7 (patch)
tree3d9d8442ed3d83e880ffb7bdc6e1f506c80ca8ca /video
parent2ce7face96c3c08582cd4aebf59aa99a9d741a7f (diff)
downloadmpv-3412c1a1aa609a580150925aa28a8de0f10d8ef7.tar.bz2
mpv-3412c1a1aa609a580150925aa28a8de0f10d8ef7.tar.xz
Restore Libav support
Libav has been broken due to the hwdec changes. This was always a temporary situation (depended on pending patches to be merged), although it took a bit longer. This also restores the travis config. One code change is needed in vd_lavc.c, because it checks the AV_PIX_FMT for videotoolbox (as opposed to the mpv format identifier), which is not available in Libav. Add an ifdef; the affected code is for a deprecated option anyway.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index e0c9cb80d0..6d92702cb8 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -738,8 +738,10 @@ static int init_generic_hwaccel(struct dec_video *vd, enum AVPixelFormat hw_fmt)
AVHWFramesContext *new_fctx = (void *)new_frames_ctx->data;
+#if LIBAVCODEC_VERSION_MICRO >= 100
if (ctx->hwdec.pix_fmt == AV_PIX_FMT_VIDEOTOOLBOX)
new_fctx->sw_format = imgfmt2pixfmt(vd->opts->videotoolbox_format);
+#endif
if (vd->opts->hwdec_image_format)
new_fctx->sw_format = imgfmt2pixfmt(vd->opts->hwdec_image_format);