diff options
author | wm4 <wm4@nowhere> | 2013-12-04 21:10:10 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-04 23:12:51 +0100 |
commit | a27114bb4bc24b4d43ab31b22f680a449f3cc92e (patch) | |
tree | d056cbeae4bd957d8d7e3166299eccc19c116404 /audio/filter/af.c | |
parent | 59aed93208398e42829ea17e0639f0a3588bdf65 (diff) | |
download | mpv-a27114bb4bc24b4d43ab31b22f680a449f3cc92e.tar.bz2 mpv-a27114bb4bc24b4d43ab31b22f680a449f3cc92e.tar.xz |
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.
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r-- | audio/filter/af.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index f4da46d141..a48780885b 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -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; } |