]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vqavideo.c
avformat/avio: Add Metacube support
[ffmpeg] / libavcodec / vqavideo.c
index 0e70be1000a1f45a1b84671966bffb3ca6c53f83..a396615ce513eed820d6983bcaeb333196583a89 100644 (file)
@@ -147,7 +147,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
     }
     s->width = AV_RL16(&s->avctx->extradata[6]);
     s->height = AV_RL16(&s->avctx->extradata[8]);
-    if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0) {
+    if ((ret = ff_set_dimensions(avctx, s->width, s->height)) < 0) {
         s->width= s->height= 0;
         return ret;
     }
@@ -637,7 +637,12 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_vqa_decoder = {
+static const AVCodecDefault vqa_defaults[] = {
+    { "max_pixels", "320*240" },
+    { NULL },
+};
+
+const AVCodec ff_vqa_decoder = {
     .name           = "vqavideo",
     .long_name      = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"),
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -647,4 +652,5 @@ AVCodec ff_vqa_decoder = {
     .close          = vqa_decode_end,
     .decode         = vqa_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .defaults       = vqa_defaults,
 };