aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-03-22 16:26:34 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-28 08:40:01 +0100
commitda678161286cd84d34d3582b4a2d9bca69e64374 (patch)
treefba945f01f238bbe1f88312754faebd0b67f564c /fftools/ffmpeg_demux.c
parent56320880f7df58583c18ff722fe252871294aa60 (diff)
downloadffmpeg-da678161286cd84d34d3582b4a2d9bca69e64374.tar.gz
fftools/ffmpeg_demux: only call filter_codec_opts() when we have a decoder
It is pointless otherwise, as decoder options will not be used.
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r--fftools/ffmpeg_demux.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 47312c9fe1..73b0eb0da1 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -1329,10 +1329,12 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st)
if (ret < 0)
return ret;
- ret = filter_codec_opts(o->g->codec_opts, ist->st->codecpar->codec_id,
- ic, st, ist->dec, &ds->decoder_opts);
- if (ret < 0)
- return ret;
+ if (ist->dec) {
+ ret = filter_codec_opts(o->g->codec_opts, ist->st->codecpar->codec_id,
+ ic, st, ist->dec, &ds->decoder_opts);
+ if (ret < 0)
+ return ret;
+ }
ds->reinit_filters = -1;
MATCH_PER_STREAM_OPT(reinit_filters, i, ds->reinit_filters, ic, st);