[FFmpeg-cvslog] af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.

Anton Khirnov git at videolan.org
Sat Jul 7 03:02:43 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jul  5 20:28:10 2012 +0200| [54bf88e65fe2d87a41abcbee33392725ebe2f0a0] | committer: Anton Khirnov

af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.

0 should only be returned when there was at least one output frame.

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

 libavfilter/af_amix.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index a8ec8a1..deeaa03 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -409,7 +409,7 @@ static int request_frame(AVFilterLink *outlink)
 
         available_samples = get_available_samples(s);
         if (!available_samples)
-            return 0;
+            return AVERROR(EAGAIN);
 
         return output_frame(outlink, available_samples);
     }
@@ -440,7 +440,7 @@ static int request_frame(AVFilterLink *outlink)
 
         available_samples = get_available_samples(s);
         if (!available_samples)
-            return 0;
+            return AVERROR(EAGAIN);
         available_samples = FFMIN(available_samples, wanted_samples);
     } else {
         available_samples = wanted_samples;



More information about the ffmpeg-cvslog mailing list