diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2014-10-21 11:43:56 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2014-10-21 13:28:08 +0200 |
commit | 7ba2e134fb781af4557a4cfbe616084f124de16e (patch) | |
tree | c04d53e7f972241b95e40f5d8bf9779bafc5e8d9 /libavfilter | |
parent | 6e6b79e7b8093189fd416670c4e0a7e399705cc1 (diff) | |
download | ffmpeg-7ba2e134fb781af4557a4cfbe616084f124de16e.tar.gz |
lavfi/afade: fix cur_sample computation
Use the correct timebase conversion.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_afade.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index fbf9802127..806f6f6145 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))) |