From patchwork Sat Apr 11 14:18:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 18862 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 66C8F44B79E for ; Sat, 11 Apr 2020 17:41:24 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E86F68B716; Sat, 11 Apr 2020 17:41:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D95C168AED5 for ; Sat, 11 Apr 2020 17:41:17 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id h9so5322362wrc.8 for ; Sat, 11 Apr 2020 07:41:17 -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=CYGqmTpf+J/J8MDF++O4pT+5zMZVHP923u759/eH4eg=; b=Ts4/SeOD950W4Qmy//zfgQVHLdNgiXnr+irQchBJ3m4o8+HdX+CG7x3HuI043Ly/o3 7289jtYz/CrsgpT8F2UwryVQefcGdqLzTgFF15Pvo7kObwnJtdGR6Gmph1vIEphOX6Js DGQdC7mJEAZV2bWDRpn9SkP8UfnqsFJ7iDjCxRISr4trYri2CLt7phQqEJrc7x48ItUt gzQRnubiuigRrjo0CJFNMfRGudu3N/P3li9vC3DxgtXY6m6ruljfEr0TphC00TlU5Ngd H6VAxBSCdXuTfvykKIEYjhibaeAzOMRiP4ozjZjDnd6f9EjzKh0vn71k4CZyJXdRaCHe /0sw== 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=CYGqmTpf+J/J8MDF++O4pT+5zMZVHP923u759/eH4eg=; b=hXs8+TNgECZUOBMu3HFIArC0fCfM7v+ShtWckyj8i08cn0dWWqir1M5vNQkYNMv2xq XQKwKY/pS/wpN7whocqJjZjVqZ/WwhfMNy1rRVUjGxkb1q9HUH8pIybw+BNsGZfWU/py J2F07JDp9RpqG3X0bDlGkCdfgWygIGTHs1/5uyG/Y3fIEFXCv2rbhtH+Ev4XHnrB/SdT W89rc0BIYU4VngaaM+tI+B4JoChosLXQGyybDQ/eoTUsjYRdQTwiIIkKS5pjDeDMMK2t tDi7rV98NpEyd5atPdSEw8U+86FdBaCytpOjI7qF6+6pj3DmkChaw9axOv+1B/3/PgaZ Uz6Q== X-Gm-Message-State: AGi0PuadXIwn0q8lrcricyWYBT2mI4JtMgHJEJ3RbKuodDbXqJFUEzEz Kz1aBultvBMafCoA2JHG0KquXNaO X-Google-Smtp-Source: APiQypIOryCc8+q9h+2H0zv+c+Nm5sxx/cTtMINcxADNJQgYVXFqpWnV5MxE2l4dLf44/hAfGjoYuw== X-Received: by 2002:a05:6000:192:: with SMTP id p18mr10172044wrx.398.1586614710885; Sat, 11 Apr 2020 07:18:30 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id p190sm6931040wmp.38.2020.04.11.07.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2020 07:18:29 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 Apr 2020 16:18:23 +0200 Message-Id: <20200411141823.9403-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/ac3_tab: Zero-terminate ff_ac3_sample_rate_tab 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" This is required to use it as an AVCodec.supported_samplerates array. Adding the sentinel has been forgotten in 4679a474. Without it e.g. the FATE-test ffmpeg-filter_complex_audio fails with ASAN. Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3tab.c | 2 +- libavcodec/ac3tab.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c index 96ef8ebaeb..ef2a41bc59 100644 --- a/libavcodec/ac3tab.c +++ b/libavcodec/ac3tab.c @@ -126,7 +126,7 @@ const uint8_t ff_ac3_dec_channel_map[8][2][6] = { }; /* possible frequencies */ -const int ff_ac3_sample_rate_tab[3] = { 48000, 44100, 32000 }; +const int ff_ac3_sample_rate_tab[] = { 48000, 44100, 32000, 0 }; /* possible bitrates */ const uint16_t ff_ac3_bitrate_tab[19] = { diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h index f0f6e6ccc4..1d1264e3fc 100644 --- a/libavcodec/ac3tab.h +++ b/libavcodec/ac3tab.h @@ -33,7 +33,7 @@ extern const uint8_t ff_ac3_channels_tab[8]; extern av_export_avcodec const uint16_t avpriv_ac3_channel_layout_tab[8]; extern const uint8_t ff_ac3_enc_channel_map[8][2][6]; extern const uint8_t ff_ac3_dec_channel_map[8][2][6]; -extern const int ff_ac3_sample_rate_tab[3]; +extern const int ff_ac3_sample_rate_tab[]; extern const uint16_t ff_ac3_bitrate_tab[19]; extern const uint8_t ff_ac3_rematrix_band_tab[5]; extern const uint8_t ff_eac3_default_cpl_band_struct[18];