[FFmpeg-devel] [PATCH 03/17] avcodec/dxva2: initialize validate

Michael Niedermayer michael at niedermayer.cc
Mon May 27 02:52:15 EEST 2024


Fixes: CID1591915 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/dxva2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
index 550369ba51f..1a33c8bbac7 100644
--- a/libavcodec/dxva2.c
+++ b/libavcodec/dxva2.c
@@ -269,7 +269,7 @@ static int dxva_get_decoder_guid(AVCodecContext *avctx, void *service, void *sur
     *decoder_guid = ff_GUID_NULL;
     for (i = 0; dxva_modes[i].guid; i++) {
         const dxva_mode *mode = &dxva_modes[i];
-        int validate;
+        int validate = 0;
         if (!dxva_check_codec_compatibility(avctx, mode))
             continue;
 
-- 
2.45.1



More information about the ffmpeg-devel mailing list