[FFmpeg-cvslog] avfilter/af_afftfilt: fix pts handling when timebase and 1/samplerate differ

Paul B Mahol git at videolan.org
Sun Nov 17 13:39:35 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 17 12:19:39 2019 +0100| [c588a0f5281f242f63838ed58fee905308a320a6] | committer: Paul B Mahol

avfilter/af_afftfilt: fix pts handling when timebase and 1/samplerate differ

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

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

diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index 28b4bda8da..7506aebe9f 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -315,7 +315,7 @@ static int filter_frame(AVFilterLink *inlink)
     }
 
     out->pts = s->pts;
-    s->pts += s->hop_size;
+    s->pts += av_rescale_q(s->hop_size, (AVRational){1, outlink->sample_rate}, outlink->time_base);
 
     for (ch = 0; ch < inlink->channels; ch++) {
         float *dst = (float *)out->extended_data[ch];



More information about the ffmpeg-cvslog mailing list