Browse Source

lavc/vaapi_encode: Fix potential use of uninitialized value

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Fei Wang 6 months ago
parent
commit
5211ad1acd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libavcodec/vaapi_encode.c

+ 1 - 1
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;