[FFmpeg-cvslog] asrc_abuffer: return EAGAIN if no frame is available

Matthieu Bouron git at videolan.org
Fri Apr 27 22:27:48 CEST 2012


ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at smartjog.com> | Thu Apr 26 17:28:23 2012 +0200| [73c1e3baadb45b693a31b67f8b04e9c147ce3da1] | committer: Michael Niedermayer

asrc_abuffer: return EAGAIN if no frame is available

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73c1e3baadb45b693a31b67f8b04e9c147ce3da1
---

 libavfilter/asrc_abuffer.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavfilter/asrc_abuffer.c b/libavfilter/asrc_abuffer.c
index 5eca785..eab83e2 100644
--- a/libavfilter/asrc_abuffer.c
+++ b/libavfilter/asrc_abuffer.c
@@ -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));



More information about the ffmpeg-cvslog mailing list