[vlc-commits] qsv: log when the encoder outputs empty data

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


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Sep 18 17:30:33 2017 +0200| [3488d336263edbe5b4d7c11ad9e2ce242d5a55f7] | committer: Steve Lhomme

qsv: log when the encoder outputs empty data

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

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

diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
index 51b0360fbd..51454b0d27 100644
--- a/modules/codec/qsv.c
+++ b/modules/codec/qsv.c
@@ -716,6 +716,11 @@ static block_t *qsv_synchronize_block(encoder_t *enc, async_task_t *task)
                 "Updating your drivers and/or changing the encoding settings might resolve this", sts);
         return NULL;
     }
+    if (task->bs.DataLength == 0)
+    {
+        msg_Dbg(enc, "Empty encoded block");
+        return NULL;
+    }
     block_t *block = task->block;
     block->i_buffer = task->bs.DataLength;
     block->p_buffer += task->bs.DataOffset;



More information about the vlc-commits mailing list