aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-01-23 18:28:57 +0100
committerAnton Khirnov <anton@khirnov.net>2024-01-30 09:52:00 +0100
commite0a6cb07b21fe958f30b0ed47a5ae5b9d16693bd (patch)
treee68abd23ce5a383796027f45f74f95a207566238 /fftools/ffmpeg_demux.c
parent4bdffec8144cacdb1a54180797b07b49e390e8ec (diff)
downloadffmpeg-e0a6cb07b21fe958f30b0ed47a5ae5b9d16693bd.tar.gz
fftools/ffmpeg_dec: move flags to DecoderOpts
Will be useful in the following commit.
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r--fftools/ffmpeg_demux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 0f426e3c2e..5ee07f706b 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -893,8 +893,6 @@ static int ist_use(InputStream *ist, int decoding_needed)
if (decoding_needed && ds->sch_idx_dec < 0) {
int is_audio = ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO;
- int dec_flags = (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) |
- (!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE);
ret = sch_add_dec(d->sch, decoder_thread, ist, d->loop && is_audio);
if (ret < 0)
@@ -906,8 +904,11 @@ static int ist_use(InputStream *ist, int decoding_needed)
if (ret < 0)
return ret;
+ ds->dec_opts.flags = (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) |
+ (!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE);
+
ret = dec_open(ist, d->sch, ds->sch_idx_dec,
- &ist->decoder_opts, dec_flags, &ds->dec_opts);
+ &ist->decoder_opts, &ds->dec_opts);
if (ret < 0)
return ret;