aacdec: Do not fail on emtpy buffers.
authorAndre Noll <maan@systemlinux.org>
Sat, 28 Feb 2009 11:45:51 +0000 (12:45 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 28 Feb 2009 11:45:51 +0000 (12:45 +0100)
aacdec_filter.c

index d9226b0..1ceca1f 100644 (file)
@@ -62,7 +62,10 @@ static ssize_t aacdec(char *input_buffer, size_t len, struct filter_node *fn)
 
        if (fn->loaded > fn->bufsize * 3 / 5)
                return 0;
-       if (len < 2048 && !*fc->input_error)
+       ret = *fc->input_error;
+       if (ret < 0)
+               return ret;
+       if (len < 2048)
                return 0;
 
        if (!padd->initialized) {