From patchwork Thu Oct 22 18:25:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23156 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 EF45B44931F for ; Thu, 22 Oct 2020 21:26:02 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CCD3668A48B; Thu, 22 Oct 2020 21:26:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F28DB689F05 for ; Thu, 22 Oct 2020 21:25:56 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id l15so3605564wmi.3 for ; Thu, 22 Oct 2020 11:25:56 -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:mime-version :content-transfer-encoding; bh=zzvR4pRnSQZvQ8eKsvHhtTwQnxrmkcEQ6E5Zx6H5XTo=; b=Kgu4ooJCn4MGlz27W+n13iqkk88wef1vw/e3AQfYW4XczM1ooXWLw0jT7UsI20rM7d B5go5DaSFXXxLMtZTvUqgetx9Um5bau+MJnGQWif/6dkg6hR+947GxNmrdM6RBF8oSP5 8mxHCbS7gvz8JZVQOz25LCjNhBS2ZyjXOF0smJKUJCMQ03FF8X3HAoH0mLHB5jAgPnRo LGuFKYs0keIGjMWKC3L/cOQquy/AT8Nv/VXxilr05ZMu5PNKOqsckaaK5zyWJ+N0F4Ut uRAVMLmX+0yJzL4QfSIa5FDpgHB+sPTMIw6tr3RKv960c/pLCJ4HmC61WNYVHTNo6vs1 OhdA== 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:mime-version :content-transfer-encoding; bh=zzvR4pRnSQZvQ8eKsvHhtTwQnxrmkcEQ6E5Zx6H5XTo=; b=oz7DybAzGWQ4eRgUZnWtkcyhOcgrKOxgsM9pew4JRYhZe4m5Wy1Zp/revYNesDRq7m KKlDTiL60ZEOVCYZ+cf3CuaLO5ojcyQASbDvW4GdEcbDOB5FSymUa8vl+TvNA28JWvh1 HhiF4FTRWTxuWUA6Bct2Rp+vE3zMvCpCGP/dNRZsDd04/aJguqkDhw0X3eoHDfArCt0v vy6tcXNKlmh4SRdbjwdVd/yz/4qKZrcUVhKfvwg4JSTq1agtnimSAYywO8lEEiA6xLLz qbBynhKvvtx0cXGk8Vk8zaeIkdxbskSCy5Ijj4+65mIJm/NedBK0qF+hewxXvUu+cSN2 OMcA== X-Gm-Message-State: AOAM532yrQan6riMNllIqNyVgbw2E4guIJd8HJZ2wxuWP7sHC5DPh6Vl 3wpdkn9QCjAdTRa3ugOOS89nxyAczAk= X-Google-Smtp-Source: ABdhPJwMbVOAUtBFLt57+Up+SpYFN1bss/GRxcM0Xi6EsqQ9xr/SweCpNMstStQ5EPnuB8Sd/mxTQw== X-Received: by 2002:a1c:5a06:: with SMTP id o6mr3893956wmb.181.1603391156182; Thu, 22 Oct 2020 11:25:56 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id c130sm4401986wma.1.2020.10.22.11.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 11:25:55 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 22 Oct 2020 20:25:49 +0200 Message-Id: <20201022182550.666546-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/wma: Remove unused 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 --- libavcodec/wma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavcodec/wma.c b/libavcodec/wma.c index b4992095ec..cfa5fa3355 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -39,19 +39,17 @@ static av_cold int init_coef_vlc(VLC *vlc, uint16_t **prun_table, const uint8_t *table_bits = vlc_table->huffbits; const uint32_t *table_codes = vlc_table->huffcodes; const uint16_t *levels_table = vlc_table->levels; - uint16_t *run_table, *level_table, *int_table; + uint16_t *run_table, *int_table; float *flevel_table; int i, l, j, k, level; init_vlc(vlc, VLCBITS, n, table_bits, 1, 1, table_codes, 4, 4, 0); run_table = av_malloc_array(n, sizeof(uint16_t)); - level_table = av_malloc_array(n, sizeof(uint16_t)); flevel_table = av_malloc_array(n, sizeof(*flevel_table)); int_table = av_malloc_array(n, sizeof(uint16_t)); - if (!run_table || !level_table || !flevel_table || !int_table) { + if (!run_table || !flevel_table || !int_table) { av_freep(&run_table); - av_freep(&level_table); av_freep(&flevel_table); av_freep(&int_table); return AVERROR(ENOMEM); @@ -64,7 +62,6 @@ static av_cold int init_coef_vlc(VLC *vlc, uint16_t **prun_table, l = levels_table[k++]; for (j = 0; j < l; j++) { run_table[i] = j; - level_table[i] = level; flevel_table[i] = level; i++; } @@ -73,7 +70,6 @@ static av_cold int init_coef_vlc(VLC *vlc, uint16_t **prun_table, *prun_table = run_table; *plevel_table = flevel_table; *pint_table = int_table; - av_free(level_table); return 0; }