aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_amix.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-04-28 20:49:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-06 00:31:05 +0200
commitabc957e896beb3ce33c5691b9b3701993a381852 (patch)
treeb143de522b03015dc0c0ac4c59ffb67e63c5ee8f /libavfilter/af_amix.c
parentb092ee701f4d0ef2b8a4171cd38101d1ee9a1034 (diff)
downloadffmpeg-abc957e896beb3ce33c5691b9b3701993a381852.tar.gz
avfilter/af_amix: dont fail if there are no samples in output_frame()
Fixes Ticket5326 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/af_amix.c')
-rw-r--r--libavfilter/af_amix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index e64e289108..3e5e7ee118 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -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);