Originally committed as revision 11749 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-02-01 14:30:35 +00:00
parent f5b2e90010
commit a8a8f204f0
1 changed files with 5 additions and 5 deletions

View File

@ -198,10 +198,10 @@ static inline int tm2_get_token(GetBitContext *gb, TM2Codes *code)
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 @@ static int tm2_read_deltas(TM2Context *ctx, int stream_id) {
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 tm2_decode_blocks(TM2Context *ctx, AVFrame *p)
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 @@ static int decode_frame(AVCodecContext *avctx,
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)