asrc_abuffer: return EAGAIN if no frame is available
authorMatthieu Bouron <matthieu.bouron@smartjog.com>
Thu, 26 Apr 2012 15:28:23 +0000 (17:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Apr 2012 20:11:00 +0000 (22:11 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/asrc_abuffer.c

index 5eca785..eab83e2 100644 (file)
@@ -334,11 +334,8 @@ static int request_frame(AVFilterLink *outlink)
     ABufferSourceContext *abuffer = outlink->src->priv;
     AVFilterBufferRef *samplesref;
 
-    if (!av_fifo_size(abuffer->fifo)) {
-        av_log(outlink->src, AV_LOG_ERROR,
-               "request_frame() called with no available frames!\n");
-        return AVERROR(EINVAL);
-    }
+    if (!av_fifo_size(abuffer->fifo))
+        return AVERROR(EAGAIN);
 
     av_fifo_generic_read(abuffer->fifo, &samplesref, sizeof(samplesref), NULL);
     avfilter_filter_samples(outlink, avfilter_ref_buffer(samplesref, ~0));