wmadec: Kill static variable frame_count.
authorAndre Noll <maan@systemlinux.org>
Sat, 14 Nov 2009 12:06:27 +0000 (13:06 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:32 +0000 (19:34 +0100)
Non-constant static variables are verboten in filter code. It was only used for
debugging anyway.

wmadec_filter.c

index a03463d..a17c90a 100644 (file)
@@ -1076,7 +1076,6 @@ static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data,
 {
        int ret;
        int16_t *samples;
-       static int frame_count;
 
        if (buf_size == 0) {
                pwd->last_superframe_len = 0;
@@ -1130,7 +1129,6 @@ static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data,
                        ret = wma_decode_frame(pwd, samples);
                        if (ret < 0)
                                goto fail;
-                       frame_count++;
                        samples += pwd->ahi.channels * pwd->frame_len;
                }
 
@@ -1147,7 +1145,6 @@ static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data,
                        ret = wma_decode_frame(pwd, samples);
                        if (ret < 0)
                                goto fail;
-                       frame_count++;
                        samples += pwd->ahi.channels * pwd->frame_len;
                }
 
@@ -1171,12 +1168,10 @@ static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data,
                ret = wma_decode_frame(pwd, samples);
                if (ret < 0)
                        goto fail;
-               frame_count++;
                samples += pwd->ahi.channels * pwd->frame_len;
        }
-       PARA_DEBUG_LOG("frame_count: %d frame_len: %d, block_len: %d, "
-               "outbytes: %zd, eaten: %d\n",
-               frame_count, pwd->frame_len, pwd->block_len,
+       PARA_DEBUG_LOG("frame_len: %d, block_len: %d, outbytes: %zd, eaten: %d\n",
+               pwd->frame_len, pwd->block_len,
                (int8_t *) samples - (int8_t *) data, pwd->ahi.block_align);
        *data_size = (int8_t *)samples - (int8_t *)data;
        return pwd->ahi.block_align;