diff options
author | wm4 <wm4@nowhere> | 2018-02-12 19:28:30 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-02-13 17:45:29 -0800 |
commit | 706bb1d0c756be95e8646c6e433d5d24f7c75dca (patch) | |
tree | 6cbb460e04f4b394fc65cce2a17bbde6ae80e3ec /video/decode/vd_lavc.c | |
parent | 3ffa70e2da121b1924f3fb74b0de0787184de237 (diff) | |
download | mpv-706bb1d0c756be95e8646c6e433d5d24f7c75dca.tar.bz2 mpv-706bb1d0c756be95e8646c6e433d5d24f7c75dca.tar.xz |
Fix recent FFmpeg deprecations
This includes codec/muxer/demuxer iteration (different iteration
function, registration functions deprecated), and the renaming of
AVFormatContext.filename to url (plus making it a malloced string).
Libav doesn't have the new API yet, so it will break. I hope they will
add the new APIs too.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index fa07298571..4ccf62962b 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -258,9 +258,10 @@ static void add_hwdec_item(struct hwdec_info **infos, int *num_infos, static void add_all_hwdec_methods(struct hwdec_info **infos, int *num_infos) { - AVCodec *codec = NULL; + const AVCodec *codec = NULL; + void *iter = NULL; while (1) { - codec = av_codec_next(codec); + codec = av_codec_iterate(&iter); if (!codec) break; if (codec->type != AVMEDIA_TYPE_VIDEO || !av_codec_is_decoder(codec)) |