[FFmpeg-cvslog] avfilter/af_speechnorm: improve EOF timestamp precision

Paul B Mahol git at videolan.org
Mon Sep 13 00:49:06 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 12 23:44:03 2021 +0200| [db2514a5dc905ce4d64b9ace3444200c19b039bd] | committer: Paul B Mahol

avfilter/af_speechnorm: improve EOF timestamp precision

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

 libavfilter/af_speechnorm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c
index 35f8fe81a1..f56ca8e558 100644
--- a/libavfilter/af_speechnorm.c
+++ b/libavfilter/af_speechnorm.c
@@ -416,7 +416,8 @@ static int filter_frame(AVFilterContext *ctx)
 
         s->filter_channels[s->link](ctx, in, in->nb_samples);
 
-        s->pts = in->pts + in->nb_samples;
+        s->pts = in->pts + av_rescale_q(in->nb_samples, av_make_q(1, outlink->sample_rate),
+                                        outlink->time_base);
 
         return ff_filter_frame(outlink, in);
     }



More information about the ffmpeg-cvslog mailing list