diff mbox

[FFmpeg-devel,06/11] avcodec/vaapi_encode: fix potential uninitialized read

Message ID 20170611140551.11844-6-timo@rothenpieler.org
State New
Headers show

Commit Message

Timo Rothenpieler June 11, 2017, 2:05 p.m. UTC
Fixes CID 1400440
---
 libavcodec/vaapi_encode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index 7e9c00f51d..9336bbecd4 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -738,7 +738,7 @@  fail:
 static int vaapi_encode_truncate_gop(AVCodecContext *avctx)
 {
     VAAPIEncodeContext *ctx = avctx->priv_data;
-    VAAPIEncodePicture *pic, *last_pic, *next;
+    VAAPIEncodePicture *pic, *last_pic = NULL, *next;
 
     // Find the last picture we actually have input for.
     for (pic = ctx->pic_start; pic; pic = pic->next) {