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>
Sun, 5 Jun 2016 22:31:05 +0000 (00:31 +0200)
Fixes Ticket5326

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

index e64e289..3e5e7ee 100644 (file)
@@ -312,6 +312,9 @@ static int output_frame(AVFilterLink *outlink)
 
     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);