]> git.tue.mpg.de Git - paraslash.git/commitdiff
oggdec: Abort on input errors.
authorAndre Noll <maan@systemlinux.org>
Sun, 8 Mar 2009 18:58:08 +0000 (19:58 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 8 Mar 2009 18:58:08 +0000 (19:58 +0100)
oggdec_filter.c

index 8d1abb99b4f9cf47e329fa74c3186b7e47030de8..b158a5e17444112148bd1d33d90dba87e912274e 100644 (file)
@@ -125,7 +125,9 @@ static ssize_t ogg_convert(char *inbuffer, size_t len, struct filter_node *fn)
 
        if (!pod->vf) {
                int ib = 1024 * conf->initial_buffer_arg; /* initial buffer */
-               if (len <ib && !*fn->fc->input_error) {
+               if (*fn->fc->input_error < 0)
+                       return *fn->fc->input_error;
+               if (len < ib) {
                        PARA_DEBUG_LOG("initial input buffer %zd/%d, "
                                "waiting for more data\n", len, ib);
                        return 0;