]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/gifdec.c
lavc: Add coded bitstream read/write support for AV1
[ffmpeg] / libavcodec / gifdec.c
index 2eeed4c4c701b1e79af8dc4fdcbee107f86113ac..54f1d4c0ba7fdbf8129f21d535a731c8ccd6851d 100644 (file)
@@ -451,6 +451,8 @@ static av_cold int gif_decode_init(AVCodecContext *avctx)
     if (!s->frame)
         return AVERROR(ENOMEM);
     ff_lzw_decode_open(&s->lzw);
+    if (!s->lzw)
+        return AVERROR(ENOMEM);
     return 0;
 }
 
@@ -559,5 +561,7 @@ AVCodec ff_gif_decoder = {
     .close          = gif_decode_close,
     .decode         = gif_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE |
+                      FF_CODEC_CAP_INIT_CLEANUP,
     .priv_class     = &decoder_class,
 };