[FFmpeg-cvslog] avfilter/avf_showcwt: fix offset to take into initial delay
Paul B Mahol
git at videolan.org
Thu Jul 6 00:02:52 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Jul 5 23:02:08 2023 +0200| [3bbb1c023b0e00324c133a86ebb0a955dd8dea0f] | committer: Paul B Mahol
avfilter/avf_showcwt: fix offset to take into initial delay
Syncs audio with video.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3bbb1c023b0e00324c133a86ebb0a955dd8dea0f
---
libavfilter/avf_showcwt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c
index cc8740fb82..0ee4414ea2 100644
--- a/libavfilter/avf_showcwt.c
+++ b/libavfilter/avf_showcwt.c
@@ -868,7 +868,7 @@ static int output_frame(AVFilterContext *ctx)
if (s->slide != SLIDE_FRAME || s->new_frame == 1) {
int64_t pts_offset = s->new_frame ? 0LL : av_rescale(s->ihop_index, s->hop_size, s->ihop_size);
- pts_offset = av_rescale_q(pts_offset, av_make_q(1, inlink->sample_rate), inlink->time_base);
+ pts_offset = av_rescale_q(pts_offset - 16384LL, av_make_q(1, inlink->sample_rate), inlink->time_base);
s->outpicref->pts = av_rescale_q(s->in_pts + pts_offset, inlink->time_base, outlink->time_base);
s->outpicref->duration = 1;
}
More information about the ffmpeg-cvslog
mailing list