@@ -228,7 +228,6 @@ int ff_h264_alloc_tables(H264Context *h)
return 0;
fail:
- ff_h264_free_tables(h);
return AVERROR(ENOMEM);
}
@@ -420,7 +419,6 @@ static av_cold int h264_decode_init(AVCodecContext *avctx)
av_log(avctx, explode ? AV_LOG_ERROR: AV_LOG_WARNING,
"Error decoding the extradata\n");
if (explode) {
- h264_decode_end(avctx);
return ret;
}
ret = 0;
@@ -1082,6 +1080,7 @@ AVCodec ff_h264_decoder = {
.capabilities = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS |
AV_CODEC_CAP_FRAME_THREADS,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_H264_DXVA2_HWACCEL
HWACCEL_DXVA2(h264),