avfilter/af_afade: start crossfading only when first stream reached end
authorPaul B Mahol <onemda@gmail.com>
Thu, 31 Oct 2019 09:22:05 +0000 (10:22 +0100)
committerPaul B Mahol <onemda@gmail.com>
Thu, 31 Oct 2019 09:23:59 +0000 (10:23 +0100)
libavfilter/af_afade.c

index 23608fb..4edfd27 100644 (file)
@@ -485,7 +485,7 @@ static int activate(AVFilterContext *ctx)
             (AVRational){ 1, outlink->sample_rate }, outlink->time_base);
         return ff_filter_frame(outlink, in);
     } else if (ff_inlink_queued_samples(ctx->inputs[0]) >= s->nb_samples &&
-               ff_inlink_queued_samples(ctx->inputs[1]) >= s->nb_samples) {
+               ff_inlink_queued_samples(ctx->inputs[1]) >= s->nb_samples && s->cf0_eof) {
         if (s->overlap) {
             out = ff_get_audio_buffer(outlink, s->nb_samples);
             if (!out)