From cf06e3e4dd8c1023fb1dcad905f3f77fdc1cf3fb Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Fri, 20 May 2011 01:00:59 +0200 Subject: [PATCH] vsrc_buffer: return an error code if no frames are available Also decrease the log level of the corresponding message to WARNING, since the error is not fatal. --- libavfilter/vsrc_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c index 6a2fcbf36e..d1e6ffd57a 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));