X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcngdec.c;h=747ab49cd0da6916aa3ea3dfdfcc0bf8866ccca7;hb=ccca62ef991f0a47dfa30c3e822d91294b8afe4c;hp=28432ac7194b61880699e04639a6f8f650aed487;hpb=d6b62ce1aced9e2456582870382f384581cc7cbb;p=ffmpeg diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c index 28432ac7194..747ab49cd0d 100644 --- a/libavcodec/cngdec.c +++ b/libavcodec/cngdec.c @@ -69,7 +69,6 @@ static av_cold int cng_decode_init(AVCodecContext *avctx) p->excitation = av_mallocz_array(avctx->frame_size, sizeof(*p->excitation)); if (!p->refl_coef || !p->target_refl_coef || !p->lpc_coef || !p->filter_out || !p->excitation) { - cng_decode_close(avctx); return AVERROR(ENOMEM); } @@ -174,5 +173,7 @@ AVCodec ff_comfortnoise_decoder = { .close = cng_decode_close, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, - .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, + .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_INIT_CLEANUP, };