Mercurial > libavcodec.hg
comparison dxa.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 | 97e3364d267a |
children | f99e40a7155b |
comparison
equal
deleted
inserted
replaced
4826:9ca9a53a848b | 4827:b3ee9a1526b0 |
---|---|
189 return 0; | 189 return 0; |
190 } | 190 } |
191 | 191 |
192 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) | 192 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
193 { | 193 { |
194 DxaDecContext * const c = (DxaDecContext *)avctx->priv_data; | 194 DxaDecContext * const c = avctx->priv_data; |
195 uint8_t *outptr, *srcptr, *tmpptr; | 195 uint8_t *outptr, *srcptr, *tmpptr; |
196 unsigned long dsize; | 196 unsigned long dsize; |
197 int i, j, compr; | 197 int i, j, compr; |
198 int stride; | 198 int stride; |
199 int orig_buf_size = buf_size; | 199 int orig_buf_size = buf_size; |
287 return orig_buf_size; | 287 return orig_buf_size; |
288 } | 288 } |
289 | 289 |
290 static int decode_init(AVCodecContext *avctx) | 290 static int decode_init(AVCodecContext *avctx) |
291 { | 291 { |
292 DxaDecContext * const c = (DxaDecContext *)avctx->priv_data; | 292 DxaDecContext * const c = avctx->priv_data; |
293 | 293 |
294 c->avctx = avctx; | 294 c->avctx = avctx; |
295 avctx->pix_fmt = PIX_FMT_PAL8; | 295 avctx->pix_fmt = PIX_FMT_PAL8; |
296 | 296 |
297 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { | 297 if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { |
307 return 0; | 307 return 0; |
308 } | 308 } |
309 | 309 |
310 static int decode_end(AVCodecContext *avctx) | 310 static int decode_end(AVCodecContext *avctx) |
311 { | 311 { |
312 DxaDecContext * const c = (DxaDecContext *)avctx->priv_data; | 312 DxaDecContext * const c = avctx->priv_data; |
313 | 313 |
314 av_freep(&c->decomp_buf); | 314 av_freep(&c->decomp_buf); |
315 if(c->prev.data[0]) | 315 if(c->prev.data[0]) |
316 avctx->release_buffer(avctx, &c->prev); | 316 avctx->release_buffer(avctx, &c->prev); |
317 if(c->pic.data[0]) | 317 if(c->pic.data[0]) |