[vlc-commits] qsv: retry to sync when QSV returns MFX_WRN_IN_EXECUTION

Steve Lhomme git at videolan.org
Wed Apr 4 18:28:07 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Sep  4 09:16:46 2017 +0200| [cf54f27cd8d846f9cc810dff4d27c11eba42e64b] | committer: Steve Lhomme

qsv: retry to sync when QSV returns MFX_WRN_IN_EXECUTION

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf54f27cd8d846f9cc810dff4d27c11eba42e64b
---

 modules/codec/qsv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index 44b75f2386..bf1f51afc0 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -685,9 +685,13 @@ static void qsv_set_block_ts(encoder_t *enc, encoder_sys_t *sys, block_t *block,
 static block_t *qsv_synchronize_block(encoder_t *enc, async_task_t *task)
 {
     encoder_sys_t *sys = enc->p_sys;
+    mfxStatus sts;
 
     /* Synchronize and fill block_t. If the SyncOperation fails we leak :-/ (or we can segfault, ur choice) */
-    if (MFXVideoCORE_SyncOperation(sys->session, task->syncp, QSV_SYNCPOINT_WAIT) != MFX_ERR_NONE) {
+    do {
+        sts = MFXVideoCORE_SyncOperation(sys->session, task->syncp, QSV_SYNCPOINT_WAIT);
+    } while (sts == MFX_WRN_IN_EXECUTION);
+    if (sts != MFX_ERR_NONE) {
         msg_Err(enc, "SyncOperation failed, outputting garbage data. "
                 "Updating your drivers and/or changing the encoding settings might resolve this");
         return NULL;



More information about the vlc-commits mailing list