Commited in SoC by Vitor Sessak on 2008-02-06 19:55:36 Originally committed as revision 12039 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -185,6 +185,22 @@ int avfilter_request_frame(AVFilterLink *link) · 184 unmodified lines | ||
| 185 | 185 | else return -1; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | +int avfilter_poll_frame(AVFilterLink *link) | |
| 189 | +{ | |
| 190 | + int i, min=INT_MAX; | |
| 191 | + | |
| 192 | + if(link_spad(link).poll_frame) | |
| 193 | + return link_spad(link).poll_frame(link); | |
| 194 | + else | |
| 195 | + for (i=0; i<link->src->input_count; i++) { | |
| 196 | + if(!link->src->inputs[i]) | |
| 197 | + return -1; | |
| 198 | + min = FFMIN(min, avfilter_poll_frame(link->src->inputs[i])); | |
| 199 | + } | |
| 200 | + | |
| 201 | + return min; | |
| 202 | +} | |
| 203 | + | |
| 188 | 204 | /* XXX: should we do the duplicating of the picture ref here, instead of |
| 189 | 205 | * forcing the source filter to do it? */ |
| 190 | 206 | void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref) |