diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-11 13:05:46 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-04-17 12:01:40 +0200 |
commit | ff92ecad2fca6143637538fb7ab3423205ebb4a7 (patch) | |
tree | 046ae2022d3c1588e22d7ea1e85365eb32f62f1b /fftools/ffmpeg_filter.c | |
parent | ae071c9e3944ebe12e4088c81992f31d974ea904 (diff) | |
download | ffmpeg-ff92ecad2fca6143637538fb7ab3423205ebb4a7.tar.gz |
fftools/ffmpeg: stop setting InputStream fields from muxing/filtering code
Set InputStream.decoding_needed/discard/etc. only from
ist_{filter,output},add() functions. Reduces the knowledge of
InputStream internals in muxing/filtering code.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index d2a185cf98..1d88d2e3b1 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -215,7 +215,7 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost) GROW_ARRAY(filtergraphs, nb_filtergraphs); filtergraphs[nb_filtergraphs - 1] = fg; - ist_filter_add(ist, ifilter); + ist_filter_add(ist, ifilter, 1); return 0; } @@ -303,10 +303,6 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) } av_assert0(ist); - ist->discard = 0; - ist->decoding_needed |= DECODING_FOR_FILTER; - ist->st->discard = AVDISCARD_NONE; - ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs); ifilter->ist = ist; ifilter->graph = fg; @@ -318,7 +314,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) if (!ifilter->frame_queue) report_and_exit(AVERROR(ENOMEM)); - ist_filter_add(ist, ifilter); + ist_filter_add(ist, ifilter, 0); } static int read_binary(const char *path, uint8_t **data, int *len) |