diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index 7f058e1747..e5263245f7 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -195,7 +195,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) /* draw data in the buffer */ for (i = 0; i < nb_samples; i++) { - if (showwaves->buf_idx == 0 && showwaves->sample_count_mod == 0) { + if (!outpicref) { showwaves->outpicref = outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN, outlink->w, outlink->h);