X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Frl2.c;h=d75802cc120ec082db8950c1396c47518fda259a;hb=a247ac640df3da573cd661065bf53f37863e2b46;hp=6662979c52cf119811d08d9bd4404fbc962eeb4b;hpb=f4cf6ba8c9646814af842a99335c6ee312ded299;p=ffmpeg diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 6662979c52c..d75802cc120 100644 --- a/libavcodec/rl2.c +++ b/libavcodec/rl2.c @@ -134,10 +134,15 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx) Rl2Context *s = avctx->priv_data; int back_size; int i; + int ret; s->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_PAL8; + ret = ff_set_dimensions(avctx, 320, 200); + if (ret < 0) + return ret; + /** parse extra data */ if (!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE) { av_log(avctx, AV_LOG_ERROR, "invalid extradata size\n"); @@ -213,7 +218,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) } -AVCodec ff_rl2_decoder = { +const AVCodec ff_rl2_decoder = { .name = "rl2", .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), .type = AVMEDIA_TYPE_VIDEO,