]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flashsv.c
avcodec/alsdec: Fix integer overflow in decode_var_block_data()
[ffmpeg] / libavcodec / flashsv.c
index 1dc3c710dcbe88dab34530d8a92eef5049001cc6..92d1af9fcfba818ed8b92e1235f465509f214e4e 100644 (file)
@@ -132,7 +132,6 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
 
     s->frame = av_frame_alloc();
     if (!s->frame) {
-        flashsv_decode_end(avctx);
         return AVERROR(ENOMEM);
     }
 
@@ -518,6 +517,7 @@ AVCodec ff_flashsv_decoder = {
     .close          = flashsv_decode_end,
     .decode         = flashsv_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
 };
 #endif /* CONFIG_FLASHSV_DECODER */
@@ -585,6 +585,7 @@ AVCodec ff_flashsv2_decoder = {
     .close          = flashsv2_decode_end,
     .decode         = flashsv_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE },
 };
 #endif /* CONFIG_FLASHSV2_DECODER */