History

avfilter/avf_showspectrum: fix pts offset by one

Paul B Mahol committed 4 years ago

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

Unified · Split

libavfilter/avf_showspectrum.c+2−1
@@ -1064,6 +1064,7 @@ static int config_output(AVFilterLink *outlink) · 1063 unmodified lines
1064 int i, fft_size, h, w, ret;1064 int i, fft_size, h, w, ret;
1065 float overlap;1065 float overlap;
1066 1066
1067 s->old_pts = AV_NOPTS_VALUE;
1067 s->dmax = expf(s->limit * M_LN10 / 20.f);1068 s->dmax = expf(s->limit * M_LN10 / 20.f);
1068 s->dmin = expf((s->limit - s->drange) * M_LN10 / 20.f);1069 s->dmin = expf((s->limit - s->drange) * M_LN10 / 20.f);
1069 1070
@@ -1610,7 +1611,7 @@ static int activate(AVFilterContext *ctx) · 540 unmodified lines
1610 if (s->data == D_UPHASE)1611 if (s->data == D_UPHASE)
1611 ff_filter_execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels);1612 ff_filter_execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels);
1612 1613
1613 if (s->xpos == 0 || s->sliding != FULLFRAME)1614 if (s->sliding != FULLFRAME || s->xpos == 0)
1614 s->in_pts = fin->pts;1615 s->in_pts = fin->pts;
1615 ret = plot_spectrum_column(inlink, fin);1616 ret = plot_spectrum_column(inlink, fin);
1616 av_frame_free(&fin);1617 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