X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fflashsv.c;h=f55cb0feebdb880e1106b0a46911ef89dee8b772;hb=c0d3fea6000bae5937df6f5744e1dfdd3ab83795;hp=1dc3c710dcbe88dab34530d8a92eef5049001cc6;hpb=5ab44ff20cdc0e05adecbd0cd352d25fcb930094;p=ffmpeg diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 1dc3c710dcb..f55cb0feebd 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -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); } @@ -369,7 +368,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, s->image_width, s->image_height, s->block_width, s->block_height, h_blocks, v_blocks, h_part, v_part); - if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) + if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0) return ret; /* loop over all block columns */ @@ -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 */