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

Anton Khirnov git at libav.org
Fri Jul 6 14:42:26 CEST 2012


Module: libav
Branch: master
Commit: 54bf88e65fe2d87a41abcbee33392725ebe2f0a0

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Thu Jul  5 20:28:10 2012 +0200

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.

---

 libavfilter/af_amix.c |    4 ++--
 1 files 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 libav-commits mailing list