[FFmpeg-cvslog] lavfi/afade: fix cur_sample computation
Stefano Sabatini
git at videolan.org
Tue Oct 21 13:31:25 CEST 2014
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Oct 21 11:43:56 2014 +0200| [7ba2e134fb781af4557a4cfbe616084f124de16e] | committer: Stefano Sabatini
lavfi/afade: fix cur_sample computation
Use the correct timebase conversion.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ba2e134fb781af4557a4cfbe616084f124de16e
---
libavfilter/af_afade.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c
index fbf9802..806f6f6 100644
--- a/libavfilter/af_afade.c
+++ b/libavfilter/af_afade.c
@@ -230,7 +230,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
AVFilterLink *outlink = inlink->dst->outputs[0];
int nb_samples = buf->nb_samples;
AVFrame *out_buf;
- int64_t cur_sample = av_rescale_q(buf->pts, (AVRational){1, outlink->sample_rate}, outlink->time_base);
+ 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)))
More information about the ffmpeg-cvslog
mailing list