Mercurial > libavcodec.hg
comparison smc.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 |
---|---|
430 } | 430 } |
431 } | 431 } |
432 | 432 |
433 static int smc_decode_init(AVCodecContext *avctx) | 433 static int smc_decode_init(AVCodecContext *avctx) |
434 { | 434 { |
435 SmcContext *s = (SmcContext *)avctx->priv_data; | 435 SmcContext *s = avctx->priv_data; |
436 | 436 |
437 s->avctx = avctx; | 437 s->avctx = avctx; |
438 avctx->pix_fmt = PIX_FMT_PAL8; | 438 avctx->pix_fmt = PIX_FMT_PAL8; |
439 dsputil_init(&s->dsp, avctx); | 439 dsputil_init(&s->dsp, avctx); |
440 | 440 |
445 | 445 |
446 static int smc_decode_frame(AVCodecContext *avctx, | 446 static int smc_decode_frame(AVCodecContext *avctx, |
447 void *data, int *data_size, | 447 void *data, int *data_size, |
448 uint8_t *buf, int buf_size) | 448 uint8_t *buf, int buf_size) |
449 { | 449 { |
450 SmcContext *s = (SmcContext *)avctx->priv_data; | 450 SmcContext *s = avctx->priv_data; |
451 | 451 |
452 s->buf = buf; | 452 s->buf = buf; |
453 s->size = buf_size; | 453 s->size = buf_size; |
454 | 454 |
455 s->frame.reference = 1; | 455 s->frame.reference = 1; |
469 return buf_size; | 469 return buf_size; |
470 } | 470 } |
471 | 471 |
472 static int smc_decode_end(AVCodecContext *avctx) | 472 static int smc_decode_end(AVCodecContext *avctx) |
473 { | 473 { |
474 SmcContext *s = (SmcContext *)avctx->priv_data; | 474 SmcContext *s = avctx->priv_data; |
475 | 475 |
476 if (s->frame.data[0]) | 476 if (s->frame.data[0]) |
477 avctx->release_buffer(avctx, &s->frame); | 477 avctx->release_buffer(avctx, &s->frame); |
478 | 478 |
479 return 0; | 479 return 0; |