mirror of
https://github.com/mpv-player/mpv
synced 2024-12-20 05:42:19 +00:00
af_rubberband: fix filter error deadlock
rubberband_available() can return a negative value, which we assigned to a size_t variable, leading to the frame allocation to fail. This could spam "Error filtering frame.". (That it spams this instead of exiting should probably also be considered a bug.) At least in the realtime mode and in our case, a negative return value should not have any different meaning from a 0 return value, in particular because we call rubberband_get_samples_required() or set the "final" parameter for rubberband_process() to continue/stop processing.
This commit is contained in:
parent
2dc49ea866
commit
371e5d0665
@ -137,8 +137,8 @@ static int filter_out(struct af_instance *af)
|
||||
mp_audio_skip_samples(p->pending, in_samples);
|
||||
}
|
||||
|
||||
size_t out_samples = rubberband_available(p->rubber);
|
||||
if (out_samples) {
|
||||
int out_samples = rubberband_available(p->rubber);
|
||||
if (out_samples > 0) {
|
||||
struct mp_audio *out =
|
||||
mp_audio_pool_get(af->out_pool, af->data, out_samples);
|
||||
if (!out)
|
||||
|
Loading…
Reference in New Issue
Block a user