diff mbox series

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

Message ID 20240911013755.1129753-1-fei.w.wang@intel.com
State New
Headers show
Series [FFmpeg-devel] lavc/vaapi_encode: Fix potential use of uninitialized value | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Wang, Fei W Sept. 11, 2024, 1:37 a.m. UTC
From: Fei Wang <fei.w.wang@intel.com>

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
 libavcodec/vaapi_encode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang, Haihao Sept. 18, 2024, 7:30 a.m. UTC | #1
On Wo, 2024-09-11 at 09:37 +0800, fei.w.wang-at-intel.com@ffmpeg.org wrote:
> From: Fei Wang <fei.w.wang@intel.com>
> 
> Signed-off-by: Fei Wang <fei.w.wang@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;

LGTM, will apply,

Thanks
Haihao
diff mbox series

Patch

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;