diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-01-23 18:42:20 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-01-30 09:52:00 +0100 |
commit | 9ba4bc87e6c02a7dfe710534c536d17684cc6c02 (patch) | |
tree | da3e2cbbcd08470b32d57ce66d9676f8bfa0f1a8 /fftools/ffmpeg_demux.c | |
parent | 970281766200491c4e5bb2ea1480d8afc1548a3d (diff) | |
download | ffmpeg-9ba4bc87e6c02a7dfe710534c536d17684cc6c02.tar.gz |
fftools/ffmpeg_dec: pass top_field_first through DecoderOpts
Do not read it from InputStream directly.
This is a step towards decoupling Decoder and InputStream.
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r-- | fftools/ffmpeg_demux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 4cced4a7f8..3c3be214c5 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -905,7 +905,11 @@ static int ist_use(InputStream *ist, int decoding_needed) 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); + (!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE) +#if FFMPEG_OPT_TOP + | ((ist->top_field_first >= 0) * DECODER_FLAG_TOP_FIELD_FIRST) +#endif + ; if (ist->framerate.num) { ds->dec_opts.flags |= DECODER_FLAG_FRAMERATE_FORCED; |