From patchwork Sat Sep 21 02:12:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 15195 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 7BB0F4463BD for ; Sat, 21 Sep 2019 05:12:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 56BB06882FF; Sat, 21 Sep 2019 05:12:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B0FF680B4C for ; Sat, 21 Sep 2019 05:12:27 +0300 (EEST) Received: by mail-pf1-f195.google.com with SMTP id b128so5776830pfa.1 for ; Fri, 20 Sep 2019 19:12: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; bh=nRhSg0C8UC3nHxcphJavPwk+q2Tzc3BWzFG4x2b2Os8=; b=PkNrplrKdpY02exzG73l9eeERMcg054ooIlh9ISyysAvDlpEtL9D1pOfcHjIkTbEbR Gi2bHCgS06jobcdx8UkKul7c4v63eb2LKqQdSjieT0S8uDlQ3x3/+oT0bv2t782pEBcO 98xJ7RJbyRdf5qfhRPlEnO1bPT+J2QcaSVB+Cy2EXP0TJd3Yc1jyi9WDoXJ+P/gRPI2J wwXhD8Yyc5FWF4lzyvUyqPRPRIPRerO54jorbPM89aTN4Mx0RXd6PkSjxx7oDY9NOhYG DvLHyJnTN1n5uhIDZtVsa5tWpXDOF2ZogkxiHuhnKZVLVHjqjzgwNVV46XyhfamUZlkf vSPQ== 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; bh=nRhSg0C8UC3nHxcphJavPwk+q2Tzc3BWzFG4x2b2Os8=; b=EAESU3VDyZ37USXFIIuLGhggZXPrXBxssImWRORWSwQlucsI7TiGNkGDPpXWWVIKCM zugQruffaD6BECXxWepNyApNmox0EO/otXjsxePzb13Aeq1BUHBLCn7XV5e3Nf2opkED vLNzCSYAeVYsrLWtaN8ZXNT298PT2VaKIaCOLQjRKtkU2foRZj8NyGgbwwFp7nl7w08k N2WwhctAET5OnX1OV+SdLL0qHg6f+wqxnC+OtObA93zKFudbx63YWuaewYuMhCrBZwEB XpwQGOOj96nYmgsurT9O1Jc/qVIQ33dcDLRszw4PtEZvyCBnIaq35ZEF/EMQXg2ON+AZ IBKQ== X-Gm-Message-State: APjAAAU6ucJCbkwyJ9J4b4pox6i+Bc0O6XpCy5EAOKXFb5+rNrovomzK 1Rf3mMP9FAsIbagS7EI7xA705kxq X-Google-Smtp-Source: APXvYqxYxXRztum+07sxQW0bc6jNejbVy6lL8nU7Tjcu8YcXIfp+j14k30jQiTL+aJdhL/O59CRsBw== X-Received: by 2002:a17:90a:f98f:: with SMTP id cq15mr74669pjb.54.1569031944978; Fri, 20 Sep 2019 19:12:24 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id l7sm8986688pga.92.2019.09.20.19.12.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2019 19:12:24 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Sat, 21 Sep 2019 10:12:11 +0800 Message-Id: <1569031935-8967-2-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1569031935-8967-1-git-send-email-mypopydev@gmail.com> References: <1569031935-8967-1-git-send-email-mypopydev@gmail.com> Subject: [FFmpeg-devel] [PATCH V1 2/6] lavc/aac_adtstoasc: use initialized var for avpriv_mpeg4audio_get_config 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: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao avpriv_mpeg4audio_get_config will use MPEG4AudioConfig.chan_config to get the MPEG4AudioConfig.channels, but if we use a uninitialized variable, we will get an indeterminate channels, add an explicit initialization for this case. Signed-off-by: Jun Zhao --- libavcodec/aac_adtstoasc_bsf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c index 6541b11..96e80b0 100644 --- a/libavcodec/aac_adtstoasc_bsf.c +++ b/libavcodec/aac_adtstoasc_bsf.c @@ -133,7 +133,7 @@ static int aac_adtstoasc_init(AVBSFContext *ctx) { /* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */ if (ctx->par_in->extradata) { - MPEG4AudioConfig mp4ac; + MPEG4AudioConfig mp4ac = {0}; int ret = avpriv_mpeg4audio_get_config(&mp4ac, ctx->par_in->extradata, ctx->par_in->extradata_size * 8, 1); if (ret < 0) {