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

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


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

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

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

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

diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
index 2c42f97960..092f290888 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -585,7 +585,7 @@ static int filter_frame(AVFilterLink *inlink)
         out->nb_samples = FFMIN(s->hop_size, s->samples_left);
 
     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);
 
     s->detected_errors += detected_errors;
     s->nb_samples += out->nb_samples * inlink->channels;



More information about the ffmpeg-cvslog mailing list