[FFmpeg-cvslog] lavfi: fix pts rescaling in the resampler

Michael Niedermayer git at videolan.org
Wed May 16 03:59:43 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 16 03:54:04 2012 +0200| [efdc895fbdd31aa57fa57627bf6c38479c00145d] | committer: Michael Niedermayer

lavfi: fix pts rescaling in the resampler

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efdc895fbdd31aa57fa57627bf6c38479c00145d
---

 libavfilter/af_aresample.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index abc8235..a5ab38e 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -138,7 +138,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
     outsamplesref->audio->sample_rate = outlink->sample_rate;
     outsamplesref->audio->nb_samples  = n_out;
     outsamplesref->pts = insamplesref->pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE :
-        av_rescale(outlink->sample_rate, insamplesref->pts, inlink ->sample_rate);
+        av_rescale_q(insamplesref->pts, inlink->time_base, outlink->time_base);
 
     ff_filter_samples(outlink, outsamplesref);
     avfilter_unref_buffer(insamplesref);



More information about the ffmpeg-cvslog mailing list