aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-15 21:40:26 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-15 21:40:26 +0000
commit7b02c484eb4e5b1b10fa060c42932e303d58e392 (patch)
tree2380a493afd79ce93558ae5fd5bcb0cd21247c27
parentb62966c02e72734c57b1adaeed28901abd4709ab (diff)
downloadffmpeg-7b02c484eb4e5b1b10fa060c42932e303d58e392.tar.gz
Implement poll_frame() method. Fix ffmpeg.c bug with
vf_fps filter. 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
-rw-r--r--libavfilter/avfilter.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 08e6aaefc8..f2a42cbd50 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -185,6 +185,22 @@ int avfilter_request_frame(AVFilterLink *link)
else return -1;
}
+int avfilter_poll_frame(AVFilterLink *link)
+{
+ int i, min=INT_MAX;
+
+ if(link_spad(link).poll_frame)
+ return link_spad(link).poll_frame(link);
+ else
+ for (i=0; i<link->src->input_count; i++) {
+ if(!link->src->inputs[i])
+ return -1;
+ min = FFMIN(min, avfilter_poll_frame(link->src->inputs[i]));
+ }
+
+ return min;
+}
+
/* XXX: should we do the duplicating of the picture ref here, instead of
* forcing the source filter to do it? */
void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref)