diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-07-05 22:56:05 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-07-05 22:56:05 +0200 |
commit | 0cdfe46f4e2d2152632e7588fd544d8d13f6fcc2 (patch) | |
tree | 9eff94acf24998312e6eb925fed6f0ab137f8b90 | |
parent | a196d02e866909e0e632a3f4edfffa0eee82bc51 (diff) | |
download | ffmpeg-0cdfe46f4e2d2152632e7588fd544d8d13f6fcc2.tar.gz |
avfilter/avf_showcwt: fix output frame pts if inlink timebase does not match sample rate
-rw-r--r-- | libavfilter/avf_showcwt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c index ed1bc4c65a..cc8740fb82 100644 --- a/libavfilter/avf_showcwt.c +++ b/libavfilter/avf_showcwt.c @@ -868,6 +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); s->outpicref->pts = av_rescale_q(s->in_pts + pts_offset, inlink->time_base, outlink->time_base); s->outpicref->duration = 1; } |