History

avfilter/avf_showcwt: fix output frame pts if inlink timebase does not match sample rate

Paul B Mahol committed 3 years ago

Commit 0cdfe461 parent a196d021 file · +1 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/avf_showcwt.c+1−0
@@ -868,6 +868,7 @@ static int output_frame(AVFilterContext *ctx) · 867 unmodified lines
868868 if (s->slide != SLIDE_FRAME || s->new_frame == 1) {
869869 int64_t pts_offset = s->new_frame ? 0LL : av_rescale(s->ihop_index, s->hop_size, s->ihop_size);
870870
871+ pts_offset = av_rescale_q(pts_offset, av_make_q(1, inlink->sample_rate), inlink->time_base);
871872 s->outpicref->pts = av_rescale_q(s->in_pts + pts_offset, inlink->time_base, outlink->time_base);
872873 s->outpicref->duration = 1;
873874 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t