avfilter/af_amix: dont fail if there are no samples in output_frame()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 28 Apr 2016 18:49:13 +0000 (20:49 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 15 Aug 2016 16:54:34 +0000 (18:54 +0200)
Fixes Ticket5326

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/af_amix.c

index 9a3cbd4..a03d773 100644 (file)
@@ -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);