History

avfilter/avf_showspectrum: fix pts offset by one

Paul B Mahol committed 4 years ago

Commit a34fe3d1 parent fe2eb971 file · +2 −1Browse files

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

Unified · Split

libavfilter/avf_showspectrum.c+2−1
@@ -1064,6 +1064,7 @@ static int config_output(AVFilterLink *outlink) · 1063 unmodified lines
10641064 int i, fft_size, h, w, ret;
10651065 float overlap;
10661066
1067+ s->old_pts = AV_NOPTS_VALUE;
10671068 s->dmax = expf(s->limit * M_LN10 / 20.f);
10681069 s->dmin = expf((s->limit - s->drange) * M_LN10 / 20.f);
10691070
@@ -1610,7 +1611,7 @@ static int activate(AVFilterContext *ctx) · 540 unmodified lines
16101611 if (s->data == D_UPHASE)
16111612 ff_filter_execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels);
16121613
1613− if (s->xpos == 0 || s->sliding != FULLFRAME)
1614+ if (s->sliding != FULLFRAME || s->xpos == 0)
16141615 s->in_pts = fin->pts;
16151616 ret = plot_spectrum_column(inlink, fin);
16161617 av_frame_free(&fin);

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