From 706bb1d0c756be95e8646c6e433d5d24f7c75dca Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Feb 2018 19:28:30 +0100 Subject: 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. --- video/decode/vd_lavc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video/decode') 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)) -- cgit v1.2.3