Discussion:
[PATCH] lavu/qsv: fix a random hwupload failure regression
(too old to reply)
Zhong Li
2018-09-30 09:59:52 UTC
Permalink
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.

Signed-off-by: Zhong Li <***@intel.com>
---
libavutil/hwcontext_qsv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 1887936..f550bac 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -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
--
2.7.4
Luca Barbato
2018-10-03 05:56:51 UTC
Permalink
Post by Zhong Li
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.
---
libavutil/hwcontext_qsv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 1887936..f550bac 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -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
Sounds correct, thank you for spotting it!

lu
Rogozhkin, Dmitry V
2018-10-03 16:59:41 UTC
Permalink
Post by Luca Barbato
Post by Zhong Li
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.
---
 libavutil/hwcontext_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 1887936..f550bac 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -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
Sounds correct, thank you for spotting it!
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Works on my side and fixes an issue with hwupload which I saw. Can,
please, this be merged?
Luca Barbato
2018-10-03 21:36:15 UTC
Permalink
Post by Rogozhkin, Dmitry V
Post by Luca Barbato
Post by Zhong Li
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.
---
 libavutil/hwcontext_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 1887936..f550bac 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -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
Sounds correct, thank you for spotting it!
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Works on my side and fixes an issue with hwupload which I saw. Can,
please, this be merged?
It should already.
Li, Zhong
2018-10-08 03:09:10 UTC
Permalink
Barbato
Sent: Thursday, October 4, 2018 5:36 AM
Subject: Re: [libav-devel] [PATCH] lavu/qsv: fix a random hwupload failure
regression
Post by Rogozhkin, Dmitry V
Post by Luca Barbato
Post by Zhong Li
Variable 'ret' hasn't been initialized,thus introducing a random
hwupload failure regression due to qsv session uninitialized.
---
 libavutil/hwcontext_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 1887936..f550bac 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -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
Sounds correct, thank you for spotting it!
lu
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Works on my side and fixes an issue with hwupload which I saw. Can,
please, this be merged?
It should already.
Thank you, Luca!

Continue reading on narkive:
Loading...