[FFmpeg-cvslog] tta: Fix several warning: initialization from incompatible pointer type [ enabled by default]

Michael Niedermayer git at videolan.org
Sun Dec 18 01:22:44 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 18 00:39:48 2011 +0100| [bd35dfeaa083bc5fb38d900a3055a418ee64118b] | committer: Michael Niedermayer

tta: Fix several warning: initialization from incompatible pointer type [enabled by default]

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd35dfeaa083bc5fb38d900a3055a418ee64118b
---

 libavcodec/tta.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 2c3539e..684b3fe 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -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



More information about the ffmpeg-cvslog mailing list