]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tta.c
Merge remote-tracking branch 'shariman/wmall'
[ffmpeg] / libavcodec / tta.c
index 2c3539e44fb1decf4b5865850b3e9058c0a0509d..f6299018880b78a967e0849dd3e37e1cf2bded18 100644 (file)
@@ -27,7 +27,7 @@
  * @author Alex Beregszaszi
  */
 
-#define ALT_BITSTREAM_READER_LE
+#define BITSTREAM_READER_LE
 //#define DEBUG
 #include <limits.h>
 #include "avcodec.h"
@@ -418,7 +418,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
         // convert to output buffer
         switch(s->bps) {
             case 1: {
-                uint8_t *samples = (int16_t *)s->frame.data[0];
+                uint8_t *samples = (uint8_t *)s->frame.data[0];
                 for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++)
                     *samples++ = *p + 0x80;
                 break;
@@ -431,7 +431,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
             }
             case 3: {
                 // shift samples for 24-bit sample format
-                int32_t *samples = (int16_t *)s->frame.data[0];
+                int32_t *samples = (int32_t *)s->frame.data[0];
                 for (p = s->decode_buffer; p < s->decode_buffer + (framelen * s->channels); p++)
                     *samples++ <<= 8;
                 // reset decode buffer