changeset 6258:6412f1a039ba libavcodec

const
author michael
date Fri, 01 Feb 2008 14:30:35 +0000
parents 68d4853b5fae
children ac7171cbf931
files truemotion2.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/truemotion2.c	Fri Feb 01 14:28:50 2008 +0000
+++ b/truemotion2.c	Fri Feb 01 14:30:35 2008 +0000
@@ -198,10 +198,10 @@
     return code->recode[val];
 }
 
-static inline int tm2_read_header(TM2Context *ctx, uint8_t *buf)
+static inline int tm2_read_header(TM2Context *ctx, const uint8_t *buf)
 {
     uint32_t magic;
-    uint8_t *obuf;
+    const uint8_t *obuf;
     int length;
 
     obuf = buf;
@@ -260,7 +260,7 @@
     return 0;
 }
 
-static int tm2_read_stream(TM2Context *ctx, uint8_t *buf, int stream_id) {
+static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id) {
     int i;
     int cur = 0;
     int skip = 0;
@@ -759,7 +759,7 @@
 
 static int decode_frame(AVCodecContext *avctx,
                         void *data, int *data_size,
-                        uint8_t *buf, int buf_size)
+                        const uint8_t *buf, int buf_size)
 {
     TM2Context * const l = avctx->priv_data;
     AVFrame * const p= (AVFrame*)&l->pic;
@@ -772,7 +772,7 @@
         return -1;
     }
 
-    l->dsp.bswap_buf((uint32_t*)buf, (uint32_t*)buf, buf_size >> 2);
+    l->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)buf, buf_size >> 2); //FIXME SERIOUS BUG
     skip = tm2_read_header(l, buf);
 
     if(skip == -1)