[FFmpeg-devel] [PATCH] vsink_buffer: do not request frames if there is nothing to pull

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Jul 8 11:00:42 CEST 2011


Perform avfilter_poll_frame() to ensure that there are available
frames before requesting them. Avoid fastidious warning.
---
 libavfilter/vsink_buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vsink_buffer.c b/libavfilter/vsink_buffer.c
index f8140b5..047815f 100644
--- a/libavfilter/vsink_buffer.c
+++ b/libavfilter/vsink_buffer.c
@@ -79,7 +79,7 @@ int av_vsink_buffer_get_video_buffer_ref(AVFilterContext *ctx,
     *picref = NULL;
 
     /* no picref available, fetch it from the filterchain */
-    if (!buf->picref) {
+    if (!buf->picref && avfilter_poll_frame(inlink)) {
         if ((ret = avfilter_request_frame(inlink)) < 0)
             return ret;
     }
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list