1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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
This commit is contained in:
Vitor Sessak 2009-10-18 22:33:37 +00:00
parent b07781b6e4
commit 9dd08b4e1e

View File

@ -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;