From patchwork Mon Sep 14 05:27:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22361 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id F0D444480DE for ; Mon, 14 Sep 2020 08:34:28 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D1ABC68BC30; Mon, 14 Sep 2020 08:34:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B8F868BC2E for ; Mon, 14 Sep 2020 08:34:27 +0300 (EEST) Received: by mail-lf1-f66.google.com with SMTP id z19so12013402lfr.4 for ; Sun, 13 Sep 2020 22:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T0CyGAdglA9BoAmRC33IMsKitGAuFDq7yQBYvErf/qc=; b=OQslUylr+WoY3IlSRKgxTgcQM7+UQHV+HeUQ5sRPyeyCZfYTxrLcAmz4fCaxjhkjOQ 47aVBonRk3iyUewuSjyhBSzdoJnfy3U/MbWrAgNhumj1c0lC1D+oLU7X9KQpGePaS09m ROt7FP9VS/79z68tplyNHooq0tqt6QS9zJancxv6QJtWoc6FUsOqKv7VqlUnIoWPSfbJ IEVTS912TWzVZGs8Kgsp8d0v2HHFrpX6Js0SsyJBFLZ8FopNzkHRZR8mwra1AkQrOmJE 8vRXepieOQoMN9DQWXlGy79kIQ1pTf4ml5sRI0LRCOaArREbWwgpCq4vr1dChbLwZfpM ho5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T0CyGAdglA9BoAmRC33IMsKitGAuFDq7yQBYvErf/qc=; b=ljT7F9wFIEFx42Dv7kJkjTs4RF22Bfd2/O+D5meuvJkTZY1qNjtQNGOhvKp0m7+llN NLSq4HbMpmdISIb06S/W60OyDU2wYXjaKl2pNGhezDyLHTydSOOVKsuNKeIi8mUDISwh q6R8dDbXjGsOd59ezYT24YPe2L9414ufgcJoNjlpCAcMyRSgy9F7QGCz7LjYEv96yrhW A2G1O5HQuGlu4j2KkGHl+QXLlTwIj+pwEK1dhhKB4P2ebn7PTwrbn6kTQ+Mp64OiKGqQ RnhR9OlaawrinmrMy2iBiw1yCN2AljJ+p+fW8Y7EULIMwFzKsRMuJwApXwkKvXnLoitS /DUw== X-Gm-Message-State: AOAM533pWxLF1zu1gw4ib+5sT9LLsuQKeRFH+6yKsj4LUl7RE+fV2uAb Jmkd66SfuEtZ8uS5Km64hwv30Cx7OV8= X-Google-Smtp-Source: ABdhPJxBFDuww5LNP5mBZki/343tHcyp7rR/UF7aEj5Sh1wYtzCFnB/746yECnyfXMWPSSwFy3tJkA== X-Received: by 2002:aa7:c053:: with SMTP id k19mr15240495edo.326.1600061298729; Sun, 13 Sep 2020 22:28:18 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id f4sm8251421edm.76.2020.09.13.22.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 22:28:18 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 14 Sep 2020 07:27:27 +0200 Message-Id: <20200914052747.124118-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> References: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 20/40] avcodec/atrac1: Cleanup generically after init failure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 9ecd49273d..4cfb1061c5 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -353,7 +353,6 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) (ret = ff_mdct_init(&q->mdct_ctx[1], 8, 1, -1.0/ (1 << 15))) || (ret = ff_mdct_init(&q->mdct_ctx[2], 9, 1, -1.0/ (1 << 15)))) { av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n"); - atrac1_decode_end(avctx); return ret; } @@ -363,7 +362,6 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) q->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT); if (!q->fdsp) { - atrac1_decode_end(avctx); return AVERROR(ENOMEM); } @@ -393,4 +391,5 @@ AVCodec ff_atrac1_decoder = { .capabilities = AV_CODEC_CAP_DR1, .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };