aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-02-13 12:18:27 +0100
committerAnton Khirnov <anton@khirnov.net>2024-02-21 10:27:20 +0100
commitfef3052df3166c477f4ab5311f4ee2e18d0296de (patch)
treecdad85996e12a9e8d53bc79042b25ebedfcdd586 /fftools/ffmpeg_demux.c
parent6315f78e0c0d847532f221cc696956888410d094 (diff)
downloadffmpeg-fef3052df3166c477f4ab5311f4ee2e18d0296de.tar.gz
fftools/ffmpeg_filter: pass autorotate/reinit flags through InputFilterOptions
Rather than read them directly from InputStream. This is a step towards avoiding the assumption that filtergraph inputs are always fed by demuxers.
Diffstat (limited to 'fftools/ffmpeg_demux.c')
-rw-r--r--fftools/ffmpeg_demux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 87ed8225c2..317e27e294 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -63,6 +63,7 @@ typedef struct DemuxStream {
int streamcopy_needed;
int have_sub2video;
+ int reinit_filters;
int wrap_correction_done;
int saw_first_ts;
@@ -1033,6 +1034,9 @@ int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple,
if (!opts->name)
return AVERROR(ENOMEM);
+ opts->flags |= IFILTER_FLAG_AUTOROTATE * !!(ist->autorotate) |
+ IFILTER_FLAG_REINIT * !!(ds->reinit_filters);
+
return ds->sch_idx_dec;
}
@@ -1309,8 +1313,8 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st)
if (ret < 0)
return ret;
- ist->reinit_filters = -1;
- MATCH_PER_STREAM_OPT(reinit_filters, i, ist->reinit_filters, ic, st);
+ ds->reinit_filters = -1;
+ MATCH_PER_STREAM_OPT(reinit_filters, i, ds->reinit_filters, ic, st);
ist->user_set_discard = AVDISCARD_NONE;