From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 701734B04B for ; Sun, 26 May 2024 23:53:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50D5668D5B2; Mon, 27 May 2024 02:52:50 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BB0F468D521 for ; Mon, 27 May 2024 02:52:37 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 22E781BF205 for ; Sun, 26 May 2024 23:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716767557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lnyM9/rm3ObWEwXhD+pOtS5wvJUz4beKbLfAFRETQSU=; b=KVlz9D9Mki2z/2zqvZzln9h8Bs4Owb5haPLk9cIoM4iad8dVYpaDmh/4fL6s23qN76NR7v SIzPPKkZ9FgrIXdvMbsFPsWfyIKPeiDhIuCqPGXQ+Z0C9ElMUAWTIoUxDfObWkyfCnFMje 1FA4d7G5mwqFpu6TlRWgszRo2mNqo6w2z68/3nIByCw2WoezDvNs5Coecli7eOtzuEkpLH XBiBWBFaIqagPLek/FqW33WsrgFgeYkRNqn1nXzyMyeA3V6w+S+DsGzABLhYzLsJlz7LFy RdOoghwJLFhPkrtCNXazruzYCrFwtRZjtTmvl1dknwLeo9Z+RynOMbZjVukdNA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 27 May 2024 01:52:19 +0200 Message-ID: <20240526235230.2876318-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240526235230.2876318-1-michael@niedermayer.cc> References: <20240526235230.2876318-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 07/17] qsv: Initialize impl_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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: The warnings from CID1598553 Uninitialized scalar variable Passing partly initialized structs is ugly and asking for hard to reproduce bugs, I do not know if this actually fixes a bug or just avoids the uninitialized fields Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/qsv.c | 2 +- libavutil/hwcontext_qsv.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 6bbfe2a5a95..0c6fbd0dc09 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -496,7 +496,7 @@ static int qsv_new_mfx_loader(AVCodecContext *avctx, mfxStatus sts; mfxLoader loader = NULL; mfxConfig cfg; - mfxVariant impl_value; + mfxVariant impl_value = {0}; loader = MFXLoad(); if (!loader) { diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index f3d919daea1..7cec3474786 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -839,7 +839,7 @@ static int qsv_d3d11_update_config(void *ctx, mfxHDL handle, mfxConfig cfg) IDXGIDevice *pDXGIDevice = NULL; HRESULT hr; ID3D11Device *device = handle; - mfxVariant impl_value; + mfxVariant impl_value = {0}; hr = ID3D11Device_QueryInterface(device, &IID_IDXGIDevice, (void**)&pDXGIDevice); if (SUCCEEDED(hr)) { @@ -913,7 +913,7 @@ static int qsv_d3d9_update_config(void *ctx, mfxHDL handle, mfxConfig cfg) LUID luid; D3DDEVICE_CREATION_PARAMETERS params; HRESULT hr; - mfxVariant impl_value; + mfxVariant impl_value = {0}; hr = IDirect3DDeviceManager9_OpenDeviceHandle(devmgr, &device_handle); if (FAILED(hr)) { @@ -995,7 +995,7 @@ static int qsv_va_update_config(void *ctx, mfxHDL handle, mfxConfig cfg) VADisplayAttribute attr = { .type = VADisplayPCIID, }; - mfxVariant impl_value; + mfxVariant impl_value = {0}; vas = vaGetDisplayAttributes(dpy, &attr, 1); if (vas == VA_STATUS_SUCCESS && attr.flags != VA_DISPLAY_ATTRIB_NOT_SUPPORTED) { @@ -1036,7 +1036,7 @@ static int qsv_new_mfx_loader(void *ctx, mfxStatus sts; mfxLoader loader = NULL; mfxConfig cfg; - mfxVariant impl_value; + mfxVariant impl_value = {0}; *ploader = NULL; loader = MFXLoad(); -- 2.45.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".