Mercurial > libavcodec.hg
comparison aasc.c @ 4827:b3ee9a1526b0 libavcodec
Get rid of unnecessary pointer casts.
patch by Nicholas Tung, ntung ntung com
author | diego |
---|---|
date | Sun, 08 Apr 2007 20:24:16 +0000 |
parents | 59f4fb490fa7 |
children | f99e40a7155b |
comparison
equal
deleted
inserted
replaced
4826:9ca9a53a848b | 4827:b3ee9a1526b0 |
---|---|
45 } \ | 45 } \ |
46 stream_byte = buf[stream_ptr++]; | 46 stream_byte = buf[stream_ptr++]; |
47 | 47 |
48 static int aasc_decode_init(AVCodecContext *avctx) | 48 static int aasc_decode_init(AVCodecContext *avctx) |
49 { | 49 { |
50 AascContext *s = (AascContext *)avctx->priv_data; | 50 AascContext *s = avctx->priv_data; |
51 | 51 |
52 s->avctx = avctx; | 52 s->avctx = avctx; |
53 | 53 |
54 avctx->pix_fmt = PIX_FMT_BGR24; | 54 avctx->pix_fmt = PIX_FMT_BGR24; |
55 s->frame.data[0] = NULL; | 55 s->frame.data[0] = NULL; |
59 | 59 |
60 static int aasc_decode_frame(AVCodecContext *avctx, | 60 static int aasc_decode_frame(AVCodecContext *avctx, |
61 void *data, int *data_size, | 61 void *data, int *data_size, |
62 uint8_t *buf, int buf_size) | 62 uint8_t *buf, int buf_size) |
63 { | 63 { |
64 AascContext *s = (AascContext *)avctx->priv_data; | 64 AascContext *s = avctx->priv_data; |
65 int stream_ptr = 4; | 65 int stream_ptr = 4; |
66 unsigned char rle_code; | 66 unsigned char rle_code; |
67 unsigned char stream_byte; | 67 unsigned char stream_byte; |
68 int pixel_ptr = 0; | 68 int pixel_ptr = 0; |
69 int row_dec, row_ptr; | 69 int row_dec, row_ptr; |
151 return buf_size; | 151 return buf_size; |
152 } | 152 } |
153 | 153 |
154 static int aasc_decode_end(AVCodecContext *avctx) | 154 static int aasc_decode_end(AVCodecContext *avctx) |
155 { | 155 { |
156 AascContext *s = (AascContext *)avctx->priv_data; | 156 AascContext *s = avctx->priv_data; |
157 | 157 |
158 /* release the last frame */ | 158 /* release the last frame */ |
159 if (s->frame.data[0]) | 159 if (s->frame.data[0]) |
160 avctx->release_buffer(avctx, &s->frame); | 160 avctx->release_buffer(avctx, &s->frame); |
161 | 161 |