]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxa.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / dxa.c
index f6edc03e1a6877087bd039666db8a645cac1fae9..cddb13fea55ba5c50eb984425163c183e6e1ce70 100644 (file)
@@ -343,7 +343,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     c->dsize = avctx->width * avctx->height * 2;
     c->decomp_buf = av_malloc(c->dsize + DECOMP_BUF_PADDING);
     if (!c->decomp_buf) {
-        av_frame_free(&c->prev);
         av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
         return AVERROR(ENOMEM);
     }
@@ -361,7 +360,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_dxa_decoder = {
+const AVCodec ff_dxa_decoder = {
     .name           = "dxa",
     .long_name      = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -371,4 +370,5 @@ AVCodec ff_dxa_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };