avfilter/af_afade: fix start of fade out
authorJustin Greer <justin@zencoder.com>
Thu, 8 Oct 2015 20:26:20 +0000 (15:26 -0500)
committerPaul B Mahol <onemda@gmail.com>
Thu, 8 Oct 2015 21:09:25 +0000 (23:09 +0200)
Fixes #4919

libavfilter/af_afade.c

index 2f18222..7bc7eb3 100644 (file)
@@ -272,7 +272,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
     int64_t cur_sample = av_rescale_q(buf->pts, inlink->time_base, (AVRational){1, inlink->sample_rate});
 
     if ((!s->type && (s->start_sample + s->nb_samples < cur_sample)) ||
-        ( s->type && (cur_sample + s->nb_samples < s->start_sample)))
+        ( s->type && (cur_sample + nb_samples < s->start_sample)))
         return ff_filter_frame(outlink, buf);
 
     if (av_frame_is_writable(buf)) {