tta: use interger instead of pointer to iterate output samples for 24-bit case
authorPaul B Mahol <onemda@gmail.com>
Sun, 2 Jun 2013 22:43:31 +0000 (22:43 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sun, 2 Jun 2013 22:43:31 +0000 (22:43 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/tta.c

index 5b7c95d230063964e377003ff3681ce590a9a1ef..8b90d7f918a128983293f9966505be6e43bc8ff8 100644 (file)
@@ -381,7 +381,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
     case 3: {
         // shift samples for 24-bit sample format
         int32_t *samples = (int32_t *)frame->data[0];
-        for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++)
+        for (i = 0; i < framelen * s->channels; i++)
             *samples++ <<= 8;
         // reset decode buffer
         s->decode_buffer = NULL;