avcodec/alac: Add FF_CODEC_CAP_INIT_CLEANUP
authorLimin Wang <lance.lmwang@gmail.com>
Fri, 29 May 2020 13:08:58 +0000 (21:08 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Fri, 12 Jun 2020 22:59:18 +0000 (06:59 +0800)
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavcodec/alac.c

index 82689da..3b41373 100644 (file)
@@ -511,7 +511,6 @@ static int allocate_buffers(ALACContext *alac)
     }
     return 0;
 buf_alloc_fail:
-    alac_decode_close(alac->avctx);
     return AVERROR(ENOMEM);
 }
 
@@ -625,5 +624,6 @@ AVCodec ff_alac_decoder = {
     .close          = alac_decode_close,
     .decode         = alac_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .priv_class     = &alac_class
 };