Commit b7558ac2 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

af_amix: avoid spurious EAGAIN.

Input on/off state can change in request_samples(), which can result in
a state where only the first input is active. get_available_samples()
will then return 0, and request_frame() will fail with EAGAIN even
though there is data on the single active input.

Take this into account and check the number of active inputs again after
calling request_samples().
parent 54bf88e6
......@@ -437,7 +437,9 @@ static int request_frame(AVFilterLink *outlink)
ret = calc_active_inputs(s);
if (ret < 0)
return ret;
}
if (s->active_inputs > 1) {
available_samples = get_available_samples(s);
if (!available_samples)
return AVERROR(EAGAIN);
......
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