diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-11-17 01:11:36 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-11-17 01:15:05 +0100 |
commit | 07357e56a64530b2bba976a49719a38f46e92f01 (patch) | |
tree | 9c5f317e302d68cab898425749c1a9f77ef4ef99 /libavfilter/avf_showspectrum.c | |
parent | a640b2874ac8ce21c8dfdf992b3b4d23afe14117 (diff) |
avfilter/avf_showspectrum: fix possible hang at EOF
May happen when using filter fps option.
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index b111471116..8e9597cdf6 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1537,7 +1537,9 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples) } if (!s->single_pic && (s->sliding != FULLFRAME || s->xpos == 0)) { - if (s->old_pts < outpicref->pts || s->sliding == FULLFRAME) { + if (s->old_pts < outpicref->pts || s->sliding == FULLFRAME || + (ff_outlink_get_status(inlink) == AVERROR_EOF && + ff_inlink_queued_samples(inlink) <= s->hop_size)) { AVFrame *clone; if (s->legend) { |