This is triggerable with the HEVC decoder. It is unclear yet whether the
bug is in the calling code or the MSDK, but it seems better to check for
this in any case.
---
libavcodec/qsvdec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 6fd9442..5fe75e9 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -239,6 +239,13 @@ int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q,
return ff_qsv_error(ret);
}
+ /* make sure we do not enter an infinite loop if the SDK
+ * did not consume any data and did not return anything */
+ if (!sync && !bs.DataOffset) {
+ av_log(avctx, AV_LOG_WARNING, "A decode call did not consume any
data\n");
+ bs.DataOffset = avpkt->size;
+ }
+
if (sync) {
AVFrame *src_frame;
--
2.0.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel