avfilter/af_amix: do not request samples if inlink reached EOF
authorPaul B Mahol <onemda@gmail.com>
Sun, 27 Aug 2017 06:49:58 +0000 (08:49 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 27 Aug 2017 06:53:50 +0000 (08:53 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_amix.c

index d11edaa..09848e5 100644 (file)
@@ -370,7 +370,8 @@ static int request_samples(AVFilterContext *ctx, int min_samples)
     av_assert0(s->nb_inputs > 1);
 
     for (i = 1; i < s->nb_inputs; i++) {
-        if (!(s->input_state[i] & INPUT_ON))
+        if (!(s->input_state[i] & INPUT_ON) ||
+             (s->input_state[i] & INPUT_EOF))
             continue;
         if (av_audio_fifo_size(s->fifos[i]) >= min_samples)
             continue;