[FFmpeg-cvslog] avfilter/af_amix: dont fail if there are no samples in output_frame()

Michael Niedermayer git at videolan.org
Fri Aug 26 15:40:58 EEST 2016


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Thu Apr 28 20:49:13 2016 +0200| [76fd8145a1e24e95eea9af70a3a25e518e2d0be1] | committer: Michael Niedermayer

avfilter/af_amix: dont fail if there are no samples in output_frame()

Fixes Ticket5326

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit abc957e896beb3ce33c5691b9b3701993a381852)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavfilter/af_amix.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 9a3cbd4..a03d773 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -276,6 +276,9 @@ static int output_frame(AVFilterLink *outlink, int nb_samples)
 
     calculate_scales(s, nb_samples);
 
+    if (nb_samples == 0)
+        return 0;
+
     out_buf = ff_get_audio_buffer(outlink, nb_samples);
     if (!out_buf)
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list