[FFmpeg-devel] [PATCH] lavc/vaapi_encode: Fix potential use of uninitialized value

fei.w.wang at intel.com fei.w.wang at intel.com
Wed Sep 11 04:37:55 EEST 2024


From: Fei Wang <fei.w.wang at intel.com>

Signed-off-by: Fei Wang <fei.w.wang at intel.com>
---
 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;
-- 
2.34.1



More information about the ffmpeg-devel mailing list