Commit a16de215 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_rubberband: fix sample overqueueing

Fixes #8389
parent e21d4a7c
......@@ -121,8 +121,9 @@ static int query_formats(AVFilterContext *ctx)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
{
RubberBandContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterContext *ctx = inlink->dst;
RubberBandContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
int ret = 0, nb_samples;
......@@ -149,7 +150,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
av_frame_free(&in);
return ret < 0 ? ret : nb_samples;
if (ff_inlink_queued_samples(inlink) >= s->nb_samples)
ff_filter_set_ready(ctx, 100);
return ret < 0 ? ret : nb_samples;
}
static int config_input(AVFilterLink *inlink)
......
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