diff mbox

[FFmpeg-devel] Question for Intel QSV low latency

Message ID 20171114160139.51775-1-n.kai.cj.github@gmail.com
State New
Headers show

Commit Message

Natsuki Kai Nov. 14, 2017, 4:01 p.m. UTC
Hi,
this is re-posting of below message.
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-November/219643.html
I believe the patch format is correct this time around.

In order to encode with low latency in Intel QSV, we need to fix
libavcodec/qsvenc.c like below diff info.
I don't understand why q->async_fifo would be set to q->async_depth "+1".
If you know about that or have any comments or suggestions, please tell me.

Thank you.

---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 2bc19f5241..7d73c64dca 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -803,7 +803,7 @@  int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
 
     q->param.AsyncDepth = q->async_depth;
 
-    q->async_fifo = av_fifo_alloc((1 + q->async_depth) *
+    q->async_fifo = av_fifo_alloc((q->async_depth) *
                                   (sizeof(AVPacket) + sizeof(mfxSyncPoint*) + sizeof(mfxBitstream*)));
     if (!q->async_fifo)
         return AVERROR(ENOMEM);