comparison pngdec.c @ 7236:6c1244ad5620 libavcodec

Remove useless casts. Patch by avcoder ffmpeg at gmail d0t com
author benoit
date Thu, 10 Jul 2008 11:52:51 +0000
parents e943e1409077
children 04423b2f6e0b
comparison
equal deleted inserted replaced
7235:dd07ede98d7e 7236:6c1244ad5620
381 void *data, int *data_size, 381 void *data, int *data_size,
382 const uint8_t *buf, int buf_size) 382 const uint8_t *buf, int buf_size)
383 { 383 {
384 PNGDecContext * const s = avctx->priv_data; 384 PNGDecContext * const s = avctx->priv_data;
385 AVFrame *picture = data; 385 AVFrame *picture = data;
386 AVFrame * const p= (AVFrame*)&s->picture; 386 AVFrame * const p= &s->picture;
387 uint32_t tag, length; 387 uint32_t tag, length;
388 int ret, crc; 388 int ret, crc;
389 389
390 s->bytestream_start= 390 s->bytestream_start=
391 s->bytestream= buf; 391 s->bytestream= buf;
580 s->bytestream += length + 4; 580 s->bytestream += length + 4;
581 break; 581 break;
582 } 582 }
583 } 583 }
584 exit_loop: 584 exit_loop:
585 *picture= *(AVFrame*)&s->picture; 585 *picture= s->picture;
586 *data_size = sizeof(AVPicture); 586 *data_size = sizeof(AVFrame);
587 587
588 ret = s->bytestream - s->bytestream_start; 588 ret = s->bytestream - s->bytestream_start;
589 the_end: 589 the_end:
590 inflateEnd(&s->zstream); 590 inflateEnd(&s->zstream);
591 av_freep(&s->crow_buf); 591 av_freep(&s->crow_buf);
598 } 598 }
599 599
600 static av_cold int png_dec_init(AVCodecContext *avctx){ 600 static av_cold int png_dec_init(AVCodecContext *avctx){
601 PNGDecContext *s = avctx->priv_data; 601 PNGDecContext *s = avctx->priv_data;
602 602
603 avcodec_get_frame_defaults((AVFrame*)&s->picture); 603 avcodec_get_frame_defaults(&s->picture);
604 avctx->coded_frame= (AVFrame*)&s->picture; 604 avctx->coded_frame= &s->picture;
605 dsputil_init(&s->dsp, avctx); 605 dsputil_init(&s->dsp, avctx);
606 606
607 return 0; 607 return 0;
608 } 608 }
609 609