diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-11-17 09:49:27 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-11-23 10:36:23 +0100 |
commit | fd8bf8d3b52b683d203bfe02c6972e63199ac4f4 (patch) | |
tree | 858d6f03be0da62771c2a5b0a9d8de3a5110b501 /fftools/ffmpeg_filter.c | |
parent | 86e2ffedfe343f8e2878db84fefef0d85ebfe0dc (diff) | |
download | ffmpeg-fd8bf8d3b52b683d203bfe02c6972e63199ac4f4.tar.gz |
fftools/ffmpeg: remove the input_streams global
Replace it with an array of streams in each InputFile. This is a more
accurate reflection of the actual relationship between InputStream and
InputFile.
Analogous to what was previously done to output streams in
7ef7a22251b852faab9404c85399ba8ac5dfbdc3.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 718826a485..5d50092b72 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -271,7 +271,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) "matches no streams.\n", p, fg->graph_desc); exit_program(1); } - ist = input_streams[input_files[file_idx]->ist_index + st->index]; + ist = input_files[file_idx]->streams[st->index]; if (ist->user_set_discard == AVDISCARD_ALL) { av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s " "matches a disabled input stream.\n", p, fg->graph_desc); @@ -279,14 +279,13 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) } } else { /* find the first unused stream of corresponding type */ - for (i = 0; i < nb_input_streams; i++) { - ist = input_streams[i]; + for (ist = ist_iter(NULL); ist; ist = ist_iter(ist)) { if (ist->user_set_discard == AVDISCARD_ALL) continue; if (ist->dec_ctx->codec_type == type && ist->discard) break; } - if (i == nb_input_streams) { + if (!ist) { av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for " "unlabeled input pad %d on filter %s\n", in->pad_idx, in->filter_ctx->name); |