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

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


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

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

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

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

diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c
index 6e37452963..b8aef31c35 100644
--- a/libavfilter/af_anlmdn.c
+++ b/libavfilter/af_anlmdn.c
@@ -298,7 +298,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
             out->nb_samples = FFMIN(s->eof_left, s->offset);
             s->eof_left -= out->nb_samples;
         }
-        s->pts += s->offset;
+        s->pts += av_rescale_q(s->offset, (AVRational){1, outlink->sample_rate}, outlink->time_base);
 
         return ff_filter_frame(outlink, out);
     }



More information about the ffmpeg-cvslog mailing list