From b46607294f2fc568a4c87963c300543f9888d580 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 14 Nov 2021 00:16:15 +0000 Subject: [PATCH 1/2] Remove unused options dictionary. From ffmpeg's demuxing_decoding example upstream. --- ld-ldf-reader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ld-ldf-reader.c b/ld-ldf-reader.c index 01f9dd7a1..90194c3ed 100644 --- a/ld-ldf-reader.c +++ b/ld-ldf-reader.c @@ -97,7 +97,6 @@ static int open_codec_context(int *stream_idx, int ret, stream_index; AVStream *st; const AVCodec *dec = NULL; - AVDictionary *opts = NULL; ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0); @@ -133,7 +132,7 @@ static int open_codec_context(int *stream_idx, } /* Init the decoder */ - if ((ret = avcodec_open2(*dec_ctx, dec, &opts)) < 0) { + if ((ret = avcodec_open2(*dec_ctx, dec, NULL)) < 0) { fprintf(stderr, "Failed to open %s codec\n", av_get_media_type_string(type)); return ret; From d9f47e250cc801b945ac4a549e1567cb07a0f065 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 14 Nov 2021 00:17:02 +0000 Subject: [PATCH 2/2] Add missing #include. This fixes compilation with current ffmpeg 4.5. From ffmpeg's demuxing_decoding example upstream. --- ld-ldf-reader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ld-ldf-reader.c b/ld-ldf-reader.c index 90194c3ed..956c51c25 100644 --- a/ld-ldf-reader.c +++ b/ld-ldf-reader.c @@ -32,6 +32,7 @@ #include #include #include +#include #include static AVFormatContext *fmt_ctx = NULL;