1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-06 22:28:01 +00:00

af: returning NULL on filtering means error

This code used to be ok, until the assert() was added. Simplify the loop
statement, since the other NULL check for data doesn't make sense
anymore.
This commit is contained in:
wm4 2013-12-04 21:10:10 +01:00
parent 59aed93208
commit a27114bb4b

View File

@ -700,11 +700,13 @@ struct mp_audio *af_play(struct af_stream *s, struct mp_audio *data)
struct af_instance *af = s->first;
assert(mp_audio_config_equals(af->data, data));
// Iterate through all filters
do {
while (af) {
data = af->play(af, data);
if (!data)
return NULL;
assert(mp_audio_config_equals(af->data, data));
af = af->next;
} while (af && data);
}
return data;
}