]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wnv1.c
Fix crash when max_ref_frames was out of range.
[ffmpeg] / libavcodec / wnv1.c
index 7c0105f1eff85f3ba7359266e7acf9d37c7a0179..fa3a308dc06bd6b31ede29f8dee1ededc67fc78d 100644 (file)
@@ -58,8 +58,10 @@ static inline int wnv1_get_code(WNV1Context *w, int base_value)
 
 static int decode_frame(AVCodecContext *avctx,
                         void *data, int *data_size,
-                        const uint8_t *buf, int buf_size)
+                        AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     WNV1Context * const l = avctx->priv_data;
     AVFrame * const p= (AVFrame*)&l->pic;
     unsigned char *Y,*U,*V;