Commit ae7a4934 authored by vitor's avatar vitor

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20295 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e2bc085b
......@@ -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