ffmpeg: with filter_complex, avoid random in<->out mapping.
With complex filters, an output can come from any input, or several inputs, including inputs of a different type. Copying the codec parameters from the first input with the same type does not make any sense. This does not change anything for simple 1->1 filters, as source_index is set in that case.
This commit is contained in:
parent
fbaa8fe6c6
commit
6fef82f22d
10
ffmpeg.c
10
ffmpeg.c
@ -2730,16 +2730,6 @@ static InputStream *get_input_stream(OutputStream *ost)
|
||||
{
|
||||
if (ost->source_index >= 0)
|
||||
return input_streams[ost->source_index];
|
||||
|
||||
if (ost->filter) {
|
||||
FilterGraph *fg = ost->filter->graph;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < fg->nb_inputs; i++)
|
||||
if (fg->inputs[i]->ist->st->codec->codec_type == ost->st->codec->codec_type)
|
||||
return fg->inputs[i]->ist;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user