[FFmpeg-devel] [PATCH] vsrc_buffer: return an error code if no frames are available

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri May 20 01:02:35 CEST 2011


Also decrease the log level of the corresponding message to WARNING,
since the error is not fatal.
---
 libavfilter/vsrc_buffer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index 6a2fcbf..d1e6ffd 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -180,9 +180,9 @@ static int request_frame(AVFilterLink *link)
     BufferSourceContext *c = link->src->priv;
 
     if (!c->picref) {
-        av_log(link->src, AV_LOG_ERROR,
+        av_log(link->src, AV_LOG_WARNING,
                "request_frame() called with no available frame!\n");
-        //return -1;
+        return AVERROR(EINVAL);
     }
 
     avfilter_start_frame(link, avfilter_ref_buffer(c->picref, ~0));
-- 
1.7.2.3



More information about the ffmpeg-devel mailing list