From patchwork Wed Sep 11 01:37:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 51501 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:14c:b0:48e:c0f8:d0de with SMTP id h12csp43351vqi; Tue, 10 Sep 2024 18:35:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUusbkFluauZPp8iy8Pafq1lu7mL3gVcbYLjuprJ50muvqY4CRwCr3P7cm6ELlvE+HkHLewtaHshFx0kIbWHcwl@gmail.com X-Google-Smtp-Source: AGHT+IFTQCByfjNr1o8uLwFQ+co0fF+YYAZfNCaslP52+dWAsOHk37IzymrsA03PyXBIlTxAmfcB X-Received: by 2002:a05:6512:2514:b0:536:5827:8778 with SMTP id 2adb3069b0e04-536588130d9mr11469460e87.53.1726018548636; Tue, 10 Sep 2024 18:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726018548; cv=none; d=google.com; s=arc-20240605; b=WDPH72LD48H+qyFPQsdSfbzW1fWHcgTAZ1LTq8YsRRR6zxs4g1bqBzzTHtPwlB/HCN YWsZpGitlVxl5HEZu907TFBX7W+Kn9YaW8lnebfxJP1eETM2rrsmdB9GjRDJXTDgRvCX B2uLXie4T7NPj4ksrf3fpM9VupGW3YUPdirLCkoO09HVjJ7EB4skNNTeXAO3WZpXUdQe afRaD4fErQvaJIBJlaivf3EUrlEX6kssmWLs9NCxHYlXBtZqNhQNxFCLxTxAQDOM5U2y Rw9O9fS/JCh9Ipy6xlatXWkucQBKg+ONuOem12wQtp1fxZZF0Bh7tJxAIYYerNaqb33R EXRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=U5oGISwlnRpw26jVeSx//0H13oTXvJtkxjviIpPLHEU=; fh=i4ESP4ZRFDcfYfwXKWpOXjc2YhmIGuOsCfZUnwNO0gc=; b=h5RL+ja5IiJDXdDKtlMfgpHhH0hOC9hMVD/q9Y0qES0G/bXxPeDtJRtnyQMmYD7aCC bAojZ3l7R1sKkvikbQCgTpN3+2HMNYLD0ZHQ3Z3LtVXZ8cal4pSIhLw9oK3+UOaxI3jp WYjs7ei4i1ubY55D2UNu+tB9vNKro/Qs0Af+zgdJaw9iqI+C1zs4zWvb1w5dZE0tWY58 yUwJewHaPK1lWAlgzWLNQRVKZlEQsuGx/qeC+NRNMLQPo1r+aJGOTahEh/cgTTs9Zae0 oEEiCdrPPRCpEVBIR12Okxbczz4clEVZkeyb/MeWgJnDuWrSpGCoHzgZ9IfmG+ta5rw6 bTgw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=nvFfgi8E; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f90ef35si2769903e87.584.2024.09.10.18.35.47; Tue, 10 Sep 2024 18:35:48 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=nvFfgi8E; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8539368E1E0; Wed, 11 Sep 2024 04:35:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09ED068DEDF for ; Wed, 11 Sep 2024 04:35:36 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726018543; x=1757554543; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kh+181J3E3sxaonIYhpI5QG7M+LbfzaOrkOKPJP3v9A=; b=nvFfgi8ElrgBs0gdJoISWRYA7d+8BNKWfMlsQgh4HCO89jDww4A7LEqB UklEfTP7gg2ybVMNFypa6cfn9/9AxOscWEhqnKwFrx8RSf3+TKtkRqIOK NrWLHEBmzgNEZHg0gLfQfbmpH3G7W/FIT4D7UmgoysQ1BBqsNtN4MeIM0 jSwPOB9GaUZDrqWBjkr7ddT7m+dCGic1nC0zWg2Z4MNj8tSYed471PMQH ZEWCxn0mDjWT5R90M9TsQvxFI0mZcCPa0Dq25XJuKxt0NwDCrjfGMIcjL WD3jeY5e35eqbDAA2XscTCMEKC26fkUq/Zv/DDfkwGwCKBHUGyf8Wj2w+ Q==; X-CSE-ConnectionGUID: XAnfBQnrQuCS61XL51FR3Q== X-CSE-MsgGUID: hyAP4E9QSCaDAUEdgE8Euw== X-IronPort-AV: E=McAfee;i="6700,10204,11191"; a="47316606" X-IronPort-AV: E=Sophos;i="6.10,218,1719903600"; d="scan'208";a="47316606" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2024 18:35:36 -0700 X-CSE-ConnectionGUID: obvokSRnRf2O2hDQP3Iu5g== X-CSE-MsgGUID: jXyvykrcSo+R6lBMh9IL5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,218,1719903600"; d="scan'208";a="67445343" Received: from feiwan1-desk3.sh.intel.com ([10.238.208.39]) by fmviesa010.fm.intel.com with ESMTP; 10 Sep 2024 18:35:34 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Wed, 11 Sep 2024 09:37:55 +0800 Message-Id: <20240911013755.1129753-1-fei.w.wang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/vaapi_encode: Fix potential use of uninitialized value X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: fei.w.wang@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 0Qg1XhOI8gg/ From: Fei Wang Signed-off-by: Fei Wang --- libavcodec/vaapi_encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index 0058e1e772..16a9a364f0 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -273,7 +273,7 @@ static int vaapi_encode_issue(AVCodecContext *avctx, VAAPIEncodePicture *pic = base_pic->priv; VAAPIEncodeSlice *slice; VAStatus vas; - int err, i; + int err = 0, i; char data[MAX_PARAM_BUFFER_SIZE]; size_t bit_len; av_unused AVFrameSideData *sd;