]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wnv1.c
alac: limit the rice param before passing to decode_scalar()
[ffmpeg] / libavcodec / wnv1.c
index 65ad9cdd120be5c91b04bcfb2469d4eecff2bd3c..b57c215e8ec860f321c504695375f49e52f29470 100644 (file)
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx,
     const uint8_t *buf = avpkt->data;
     int buf_size = avpkt->size;
     WNV1Context * const l = avctx->priv_data;
-    AVFrame * const p= (AVFrame*)&l->pic;
+    AVFrame * const p = &l->pic;
     unsigned char *Y,*U,*V;
     int i, j;
     int prev_y = 0, prev_u = 0, prev_v = 0;
@@ -157,14 +157,13 @@ static av_cold int decode_end(AVCodecContext *avctx){
 }
 
 AVCodec ff_wnv1_decoder = {
-    "wnv1",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_WNV1,
-    sizeof(WNV1Context),
-    decode_init,
-    NULL,
-    decode_end,
-    decode_frame,
-    CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
+    .name           = "wnv1",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_WNV1,
+    .priv_data_size = sizeof(WNV1Context),
+    .init           = decode_init,
+    .close          = decode_end,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
+    .long_name      = NULL_IF_CONFIG_SMALL("Winnov WNV1"),
 };