X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvqavideo.c;h=a396615ce513eed820d6983bcaeb333196583a89;hb=cb9dbc60db1847fcb594684b92334da54ea8757e;hp=0e70be1000a1f45a1b84671966bffb3ca6c53f83;hpb=73d193d1d0ff62a029a905d1404c0fd357f4c880;p=ffmpeg diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index 0e70be1000a..a396615ce51 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,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, };