Commit 9dd08b4e authored by Vitor Sessak's avatar Vitor Sessak

Fix recursive avfilter_poll_frame(). It was doing

min = FFMIN(min, avfilter_poll_frame(link->src->inputs[i]))
which, since FFMIN is a macro, was calling itself
twice for every input, causing an exponential cost in time.

Originally committed as revision 20295 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b07781b6
......@@ -224,9 +224,11 @@ int avfilter_poll_frame(AVFilterLink *link)
return link_spad(link).poll_frame(link);
for (i=0; i<link->src->input_count; i++) {
int val;
if(!link->src->inputs[i])
return -1;
min = FFMIN(min, avfilter_poll_frame(link->src->inputs[i]));
val = avfilter_poll_frame(link->src->inputs[i]);
min = FFMIN(min, val);
}
return min;
......
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