diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-04-14 22:11:46 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-04-14 22:26:54 +0200 |
commit | a34fe3dfa97bbbfd055964aaf7a6b1a3badb1f8a (patch) | |
tree | 9a736c5f71dc1fea0d3635532081861d7373a9a1 /libavfilter | |
parent | fe2eb9760f3d1552298d8d12c7045eb327e70220 (diff) | |
download | ffmpeg-a34fe3dfa97bbbfd055964aaf7a6b1a3badb1f8a.tar.gz |
avfilter/avf_showspectrum: fix pts offset by one
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index f09d9145b4..00fca02e1b 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1064,6 +1064,7 @@ static int config_output(AVFilterLink *outlink) int i, fft_size, h, w, ret; float overlap; + s->old_pts = AV_NOPTS_VALUE; s->dmax = expf(s->limit * M_LN10 / 20.f); s->dmin = expf((s->limit - s->drange) * M_LN10 / 20.f); @@ -1610,7 +1611,7 @@ static int activate(AVFilterContext *ctx) if (s->data == D_UPHASE) ff_filter_execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels); - if (s->xpos == 0 || s->sliding != FULLFRAME) + if (s->sliding != FULLFRAME || s->xpos == 0) s->in_pts = fin->pts; ret = plot_spectrum_column(inlink, fin); av_frame_free(&fin); |