[FFmpeg-cvslog] avfilter/avf_showspectrum: fix possible hang at EOF
Paul B Mahol
git at videolan.org
Thu Nov 17 02:11:02 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Nov 17 01:11:36 2022 +0100| [07357e56a64530b2bba976a49719a38f46e92f01] | committer: Paul B Mahol
avfilter/avf_showspectrum: fix possible hang at EOF
May happen when using filter fps option.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07357e56a64530b2bba976a49719a38f46e92f01
---
libavfilter/avf_showspectrum.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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) {
More information about the ffmpeg-cvslog
mailing list