]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/smacker: Add FF_CODEC_CAP_INIT_CLEANUP
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Jun 2020 08:19:55 +0000 (10:19 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 30 Jun 2020 09:59:54 +0000 (11:59 +0200)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/smacker.c

index b4c463b4b92673b0a4ebe8a0a60631a23ff6eb07..9f054f071de477457b3fc068c882eb6e216e89f0 100644 (file)
@@ -600,13 +600,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
     /* decode huffman trees from extradata */
     if(avctx->extradata_size < 16){
         av_log(avctx, AV_LOG_ERROR, "Extradata missing!\n");
-        decode_end(avctx);
         return AVERROR(EINVAL);
     }
 
     ret = decode_header_trees(c);
     if (ret < 0) {
-        decode_end(avctx);
         return ret;
     }
 
@@ -840,6 +838,7 @@ AVCodec ff_smacker_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 AVCodec ff_smackaud_decoder = {