lavu/qsv: fix a random hwupload failure regression
authorZhong Li <zhong.li@intel.com>
Sun, 30 Sep 2018 09:59:52 +0000 (17:59 +0800)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 3 Oct 2018 11:10:02 +0000 (11:10 +0000)
Variable 'ret' hasn't been initialized´╝îthus introducing a random
hwupload failure regression due to qsv session uninitialized.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavutil/hwcontext_qsv.c

index 1887936..f550bac 100644 (file)
@@ -833,7 +833,7 @@ static int qsv_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
 
     mfxSyncPoint sync = NULL;
     mfxStatus err;
-    int ret;
+    int ret = 0;
 
     while (!s->session_upload_init && !s->session_upload && !ret) {
 #if HAVE_PTHREADS