[FFmpeg-cvslog] avfilter/avf_showspectrum: fix another case of frames queuing up

Paul B Mahol git at videolan.org
Sun Aug 8 17:57:44 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Aug  8 16:17:06 2021 +0200| [7dfdc15a27fc2664741a4e7cbdd435b1d7e767d6] | committer: Paul B Mahol

avfilter/avf_showspectrum: fix another case of frames queuing up

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7dfdc15a27fc2664741a4e7cbdd435b1d7e767d6
---

 libavfilter/avf_showspectrum.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index ff81d54661..1c94a06e3f 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1587,12 +1587,14 @@ static int activate(AVFilterContext *ctx)
 
     FF_FILTER_FORWARD_STATUS(inlink, outlink);
     if (av_audio_fifo_size(s->fifo) >= s->win_size ||
+        ff_inlink_queued_frames(inlink) > 0 ||
         ff_outlink_get_status(inlink) == AVERROR_EOF) {
         ff_filter_set_ready(ctx, 10);
         return 0;
     }
 
     if (ff_outlink_frame_wanted(outlink) && av_audio_fifo_size(s->fifo) < s->win_size &&
+        ff_inlink_queued_frames(inlink) == 0 &&
         ff_outlink_get_status(inlink) != AVERROR_EOF) {
         ff_inlink_request_frame(inlink);
         return 0;



More information about the ffmpeg-cvslog mailing list