]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pngdec.c
Fix RV40 chroma MC
[ffmpeg] / libavcodec / pngdec.c
index 14c67200ed13f4dde214a8f3d7d16d26a0908cd5..77ac0d155db1f09c6484f535ab127aeb38690fa7 100644 (file)
@@ -383,7 +383,7 @@ static int decode_frame(AVCodecContext *avctx,
 {
     PNGDecContext * const s = avctx->priv_data;
     AVFrame *picture = data;
-    AVFrame * const p= (AVFrame*)&s->picture;
+    AVFrame * const p= &s->picture;
     uint32_t tag, length;
     int ret, crc;
 
@@ -582,8 +582,8 @@ static int decode_frame(AVCodecContext *avctx,
         }
     }
  exit_loop:
-    *picture= *(AVFrame*)&s->picture;
-    *data_size = sizeof(AVPicture);
+    *picture= s->picture;
+    *data_size = sizeof(AVFrame);
 
     ret = s->bytestream - s->bytestream_start;
  the_end:
@@ -600,8 +600,8 @@ static int decode_frame(AVCodecContext *avctx,
 static av_cold int png_dec_init(AVCodecContext *avctx){
     PNGDecContext *s = avctx->priv_data;
 
-    avcodec_get_frame_defaults((AVFrame*)&s->picture);
-    avctx->coded_frame= (AVFrame*)&s->picture;
+    avcodec_get_frame_defaults(&s->picture);
+    avctx->coded_frame= &s->picture;
     dsputil_init(&s->dsp, avctx);
 
     return 0;