Commit 6fef82f2 authored by Nicolas George's avatar Nicolas George

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.
parent fbaa8fe6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment