aacdec: Reset "consumed" at each iteration.
authorAndre Noll <maan@systemlinux.org>
Wed, 6 Jan 2010 23:25:14 +0000 (00:25 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 6 Jan 2010 23:25:14 +0000 (00:25 +0100)
aacdec_filter.c

index e0ca6e2..a269240 100644 (file)
@@ -216,7 +216,7 @@ static void aacdec_post_select(__a_unused struct sched *s, struct task *t)
        int i, ret;
        unsigned char *p, *inbuf, *outbuffer;
        char *btr_buf;
-       size_t len, skip, consumed = 0, loaded, iqs;
+       size_t len, skip, consumed, loaded, iqs;
 
 next_buffer:
        t->error = 0;
@@ -227,6 +227,7 @@ next_buffer:
                return;
        btr_merge(btrn, fn->min_iqs);
        len = btr_next_buffer(btrn, (char **)&inbuf);
+       consumed = 0;
        iqs = btr_get_input_queue_size(btrn);
        if (!padd->initialized) {
                unsigned long rate = 0;