From 0fb30a9744dd48f066762b4cba1aa5fc9bbd394a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 28 Apr 2016 20:49:13 +0200 Subject: [PATCH] avfilter/af_amix: dont fail if there are no samples in output_frame() Fixes Ticket5326 Signed-off-by: Michael Niedermayer (cherry picked from commit abc957e896beb3ce33c5691b9b3701993a381852) Signed-off-by: Michael Niedermayer --- libavfilter/af_amix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index afd7f7eace..fddf1fe0e1 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);