Mercurial > libavcodec.hg
comparison rpza.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 | 66ef3690d108 |
children | f99e40a7155b |
comparison
equal
deleted
inserted
replaced
4826:9ca9a53a848b | 4827:b3ee9a1526b0 |
---|---|
230 } | 230 } |
231 } | 231 } |
232 | 232 |
233 static int rpza_decode_init(AVCodecContext *avctx) | 233 static int rpza_decode_init(AVCodecContext *avctx) |
234 { | 234 { |
235 RpzaContext *s = (RpzaContext *)avctx->priv_data; | 235 RpzaContext *s = avctx->priv_data; |
236 | 236 |
237 s->avctx = avctx; | 237 s->avctx = avctx; |
238 avctx->pix_fmt = PIX_FMT_RGB555; | 238 avctx->pix_fmt = PIX_FMT_RGB555; |
239 dsputil_init(&s->dsp, avctx); | 239 dsputil_init(&s->dsp, avctx); |
240 | 240 |
245 | 245 |
246 static int rpza_decode_frame(AVCodecContext *avctx, | 246 static int rpza_decode_frame(AVCodecContext *avctx, |
247 void *data, int *data_size, | 247 void *data, int *data_size, |
248 uint8_t *buf, int buf_size) | 248 uint8_t *buf, int buf_size) |
249 { | 249 { |
250 RpzaContext *s = (RpzaContext *)avctx->priv_data; | 250 RpzaContext *s = avctx->priv_data; |
251 | 251 |
252 s->buf = buf; | 252 s->buf = buf; |
253 s->size = buf_size; | 253 s->size = buf_size; |
254 | 254 |
255 s->frame.reference = 1; | 255 s->frame.reference = 1; |
268 return buf_size; | 268 return buf_size; |
269 } | 269 } |
270 | 270 |
271 static int rpza_decode_end(AVCodecContext *avctx) | 271 static int rpza_decode_end(AVCodecContext *avctx) |
272 { | 272 { |
273 RpzaContext *s = (RpzaContext *)avctx->priv_data; | 273 RpzaContext *s = avctx->priv_data; |
274 | 274 |
275 if (s->frame.data[0]) | 275 if (s->frame.data[0]) |
276 avctx->release_buffer(avctx, &s->frame); | 276 avctx->release_buffer(avctx, &s->frame); |
277 | 277 |
278 return 0; | 278 return 0; |