]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fraps.c
dca: prevent accessing static arrays with invalid indexes.
[ffmpeg] / libavcodec / fraps.c
index e2355d8f2f8011e5459bbd12b44b9322a81504b0..dc74b5112f87740ab021fb36411ac2b609b51f7a 100644 (file)
@@ -60,7 +60,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
     FrapsContext * const s = avctx->priv_data;
 
-    avctx->coded_frame = (AVFrame*)&s->frame;
+    avctx->coded_frame = &s->frame;
     avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
 
     s->avctx = avctx;
@@ -131,7 +131,7 @@ static int decode_frame(AVCodecContext *avctx,
     int buf_size = avpkt->size;
     FrapsContext * const s = avctx->priv_data;
     AVFrame *frame = data;
-    AVFrame * const f = (AVFrame*)&s->frame;
+    AVFrame * const f = &s->frame;
     uint32_t header;
     unsigned int version,header_size;
     unsigned int x, y;