[vlc-commits] qsv: call MFXVideoENCODE_EncodeFrameAsync again if it returns MFX_WRN_IN_EXECUTION

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


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

qsv: call MFXVideoENCODE_EncodeFrameAsync again if it returns MFX_WRN_IN_EXECUTION

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

 modules/codec/qsv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index bf1f51afc0..edf8bf68a9 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -751,11 +751,12 @@ static void qsv_queue_encode_picture(encoder_t *enc, async_task_t *task,
 
     for (;;) {
         sts = MFXVideoENCODE_EncodeFrameAsync(sys->session, 0, frame, &task->bs, &task->syncp);
-        if (sts != MFX_WRN_DEVICE_BUSY)
+        if (sts != MFX_WRN_DEVICE_BUSY && sts != MFX_WRN_IN_EXECUTION)
             break;
         if (sys->busy_warn_counter++ % 16 == 0)
             msg_Dbg(enc, "Device is busy, let's wait and retry");
-        msleep(QSV_BUSYWAIT_TIME);
+        if (sts == MFX_WRN_DEVICE_BUSY)
+            msleep(QSV_BUSYWAIT_TIME);
     }
 
     // msg_Dbg(enc, "Encode async status: %d, Syncpoint = %tx", sts, (ptrdiff_t)task->syncp);



More information about the vlc-commits mailing list