Commit 4c8e3725 authored by Nikolas Bowe via ffmpeg-devel's avatar Nikolas Bowe via ffmpeg-devel Committed by Michael Niedermayer

avfilter/af_asetnsamples: fix sample queuing.

When asetnsamples uses output samples < input samples, remaining samples build up in the fifo over time.
Fix this by marking the filter as ready again if there are enough samples.

Regression since ef3babb2Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8607e29f
......@@ -67,8 +67,12 @@ static int activate(AVFilterContext *ctx)
return ret;
if (ret > 0) {
if ((!s->pad || (s->pad && frame->nb_samples == s->nb_out_samples)))
return ff_filter_frame(outlink, frame);
if ((!s->pad || (s->pad && frame->nb_samples == s->nb_out_samples))) {
ret = ff_filter_frame(outlink, frame);
if (ff_framequeue_queued_samples(inlink) >= s->nb_out_samples)
ff_filter_set_ready(ctx, 100);
return ret;
}
pad_frame = ff_get_audio_buffer(outlink, s->nb_out_samples);
if (!pad_frame) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment