]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ulti.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / ulti.c
index 9e4c088b101c71d72deee2ef8628981fc58886cd..55548ae3f63d2e6f38a6ec5d731dfe6035ec76a9 100644 (file)
@@ -62,7 +62,8 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static av_cold int ulti_decode_end(AVCodecContext *avctx){
+static av_cold int ulti_decode_end(AVCodecContext *avctx)
+{
     UltimotionDecodeContext *s = avctx->priv_data;
 
     av_frame_free(&s->frame);
@@ -229,7 +230,7 @@ static int ulti_decode_frame(AVCodecContext *avctx,
     int skip;
     int tmp;
 
-    if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
+    if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)
         return ret;
 
     bytestream2_init(&s->gb, buf, buf_size);
@@ -417,7 +418,7 @@ err:
     return AVERROR_INVALIDDATA;
 }
 
-AVCodec ff_ulti_decoder = {
+const AVCodec ff_ulti_decoder = {
     .name           = "ultimotion",
     .long_name      = NULL_IF_CONFIG_SMALL("IBM UltiMotion"),
     .type           = AVMEDIA_TYPE_VIDEO,
@@ -427,4 +428,5 @@ AVCodec ff_ulti_decoder = {
     .close          = ulti_decode_end,
     .decode         = ulti_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };