From patchwork Tue Sep 8 21:18:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22190 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 CB51D44BD83 for ; Wed, 9 Sep 2020 00:19:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AD3C368B7A3; Wed, 9 Sep 2020 00:19:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0138B68B784 for ; Wed, 9 Sep 2020 00:19:41 +0300 (EEST) Received: by mail-wr1-f65.google.com with SMTP id w5so668800wrp.8 for ; Tue, 08 Sep 2020 14:19:41 -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=UF7b5g2ux9uFAuwrGi41ODjmENqn1cuTWHvaBg3a3XQ=; b=SZ1bnIa8oFc36bCTTMBUMM8zblEbBrZH1A2C88B86mQ1N8CO9gD8hOi2gS08nvtcgO Jt/PY2gBhTZ/vFhvzT7hH5VBOB1uvnTTo8t3OZKIHRDbgmI/gFckFVQQHLQQj4Jnw2af sSIMDmuCdl7+eeH0YBCSNoxf3D5cOTOPIIaFnOjn3mGBS4C+/q5LcJ6aZGHvRyQ5oemQ +GADfLBQv3NhZYuyum1IxICL439PR1oGlJOVIG0ogt5uwxxz22CEeNoluIWjd8tJu2uD 8NhirxUiRMXCCm2jVyNz40XVNY8ah2u51z9RrGTTgPmB3ur/PZs2XbcQD68BX8I78mfg ybmw== 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=UF7b5g2ux9uFAuwrGi41ODjmENqn1cuTWHvaBg3a3XQ=; b=tyL2oSWfKMpJzt17BN9fLU84VJWBHoZ2QWRngRFWWAIGr9u2VzdzlmGJb1tUnu41Tx OX2RL72Rh1SH4gHVmoORgGnSJ5qt5DAd9tn/bObmduODEjruEwD1BtTYlPTqRGGvfaJI nqeTRbSPmFg7vTOC9pPoFcg1Eq80o+jTM99XMoLa7+KoeBoKvWKrK4lB9DKOD05BgM+Y /AjMNJy8Bx+olz0nIZLkoP7SiQD1WYJd9PVvDHFGxY/zoRPR11f8BrITjbfo5hGzQmP2 sh+3kQdwKBcmeGPU1VRrcH+aqru2WEcGsU5wrbeEVNK+kqvnv9ezU2ZdBty6+OkGNv5r Q6wA== X-Gm-Message-State: AOAM530oibAsbCvz7tg8qqei5gskGAVESupt9cn6H+ZVCaMCMCGDfW2q G+Z2nUgSTgEPlWbE2RpDSdmL3R2oVtI= X-Google-Smtp-Source: ABdhPJwSeyaFjqQfosEYIVwt7O0QAaxbofNXnHVH/cY3tmqN8D7IQItTHDBZbIxBu55iv3aiFxy7Aw== X-Received: by 2002:adf:e989:: with SMTP id h9mr627756wrm.38.1599599981202; Tue, 08 Sep 2020 14:19:41 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id a15sm1074304wrn.3.2020.09.08.14.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 14:19:40 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Sep 2020 23:18:52 +0200 Message-Id: <20200908211856.16290-21-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200908211856.16290-1-andreas.rheinhardt@gmail.com> References: <20200908211856.16290-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 21/25] avfilter/af_headphone: Avoid allocating array 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 --- libavfilter/af_headphone.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index bbbe32a475..2d2b57d819 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -79,7 +79,7 @@ typedef struct HeadphoneContext { struct hrir_inputs { int ir_len; int eof; - } *hrir_in; + } hrir_in[64]; uint64_t mapping[64]; } HeadphoneContext; @@ -654,10 +654,6 @@ static av_cold int init(AVFilterContext *ctx) parse_map(ctx); - s->hrir_in = av_calloc(s->nb_hrir_inputs, sizeof(*s->hrir_in)); - if (!s->hrir_in) - return AVERROR(ENOMEM); - for (i = 0; i < s->nb_hrir_inputs; i++) { char *name = av_asprintf("hrir%d", i); AVFilterPad pad = { @@ -721,7 +717,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->data_hrtf[1]); av_freep(&s->fdsp); - av_freep(&s->hrir_in); for (unsigned i = 1; i < ctx->nb_inputs; i++) av_freep(&ctx->input_pads[i].name); }