X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvqavideo.c;h=f45390cfe54caba46f18026dd233977da2d023cb;hb=6e30b35b85b81c802e52a1078ec7a3097e353c6d;hp=0e70be1000a1f45a1b84671966bffb3ca6c53f83;hpb=0084eed5bffebd7f3915bc0f9eba7350e8bc0ef7;p=ffmpeg diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index 0e70be1000a..f45390cfe54 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -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,6 +637,11 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx) return 0; } +static const AVCodecDefault vqa_defaults[] = { + { "max_pixels", "320*240" }, + { NULL }, +}; + AVCodec ff_vqa_decoder = { .name = "vqavideo", .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) 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, };