[vlc-commits] qsv: allow one more buffer in the FIFO than the one in Async Depth

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


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Sep 15 16:41:33 2017 +0200| [13c37041ac822b1addf7eade01b64baa4577ee5f] | committer: Steve Lhomme

qsv: allow one more buffer in the FIFO than the one in Async Depth

that's what avcodec does

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

 modules/codec/qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index 939975f510..be419eb0af 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -843,7 +843,7 @@ static block_t *Encode(encoder_t *this, picture_t *pic)
             async_task_t_fifo_Put(&sys->packets, task);
     }
 
-    if ( async_task_t_fifo_GetCount(&sys->packets) == sys->async_depth ||
+    if ( async_task_t_fifo_GetCount(&sys->packets) == (sys->async_depth + 1) ||
          (!pic && async_task_t_fifo_GetCount(&sys->packets)))
     {
         assert(async_task_t_fifo_Show(&sys->packets)->syncp != 0);



More information about the vlc-commits mailing list