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.
This commit is contained in:
wm4 2017-12-20 00:43:42 +01:00 committed by Martin Herkt
parent 2ce7face96
commit 3412c1a1aa
No known key found for this signature in database
GPG Key ID: C24B9CD04DC6AE7F
3 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ os:
env:
matrix:
- LIBAV=ffmpeg-git
- LIBAV=libav-git
global:
# Coverity token
- secure: "H21mSRlMhk4BKS0xHZvCFGJxteCP0hRVUxTuNfM2Z9HBsyutuLEYMtViLO86VtM+Tqla3xXPzUdS4ozLwI72Ax/5ZUDXACROj73yW6QhFB5D6rLut12+FjqC7M33Qv2hl0xwgNBmR5dsm1ToP37+Wn+ecJQNvN8fkTXF+HVzOEw="

View File

@ -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);

View File

@ -421,7 +421,7 @@ ffmpeg_pkg_config_checks = [
]
libav_pkg_config_checks = [
'libavutil', '>= 56.6.0',
'libavcodec', '>= 58.5.0',
'libavcodec', '>= 58.8.0',
'libavformat', '>= 58.1.0',
'libswscale', '>= 5.0.0',
'libavfilter', '>= 7.0.0',