aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux_init.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-31 12:47:03 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-13 15:11:56 +0200
commita85e7e5dea542019feb85ab0730338c10c770746 (patch)
tree087ae23e14ecff3c842b16ae6444dd391799450c /fftools/ffmpeg_mux_init.c
parent798da60e6a1c2f1fd7f243829f5e007e69e914d0 (diff)
downloadffmpeg-a85e7e5dea542019feb85ab0730338c10c770746.tar.gz
fftools/ffmpeg: track a list of non-lavfi outputs in InputStream
Currently, output streams where an input stream is sent directly (i.e. not through lavfi) are determined by iterating over ALL the output streams and skipping the irrelevant ones. This is awkward and inefficient.
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r--fftools/ffmpeg_mux_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index 4b6c704046..62e5643a04 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -647,6 +647,9 @@ static OutputStream *new_output_stream(Muxer *mux, const OptionsContext *o,
if (ost->ist) {
ost->ist->discard = 0;
ost->ist->st->discard = ost->ist->user_set_discard;
+
+ if (!(ost->enc && (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)))
+ ist_output_add(ost->ist, ost);
}
ost->last_mux_dts = AV_NOPTS_VALUE;