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.
This commit is contained in:
Anton Khirnov
2023-03-31 12:47:03 +02:00
parent 798da60e6a
commit a85e7e5dea
4 changed files with 29 additions and 12 deletions

View File

@@ -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;