# HG changeset patch # User michael # Date 1201876235 0 # Node ID 6412f1a039baf5f0fb3cab7bd02ad73733a06e8f # Parent 68d4853b5faed7f30a2738e437733c33a52cb2f5 const diff -r 68d4853b5fae -r 6412f1a039ba truemotion2.c --- 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)