diff options
author | James Almer <jamrial@gmail.com> | 2017-03-31 17:14:10 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-31 17:16:39 -0300 |
commit | 4fe9d6964830f0eec94165da02c95cc2669fdfe1 (patch) | |
tree | a7980a8023a2e4f1e9d5d1994642be1496f68601 /libavcodec/qsvdec.c | |
parent | 1fb2c697d5d1cb9b25430390803cd4a24cbcf407 (diff) | |
parent | 0940b748bdba36c4894fc8ea6be631d821fdf578 (diff) | |
download | ffmpeg-4fe9d6964830f0eec94165da02c95cc2669fdfe1.tar.gz |
Merge commit '0940b748bdba36c4894fc8ea6be631d821fdf578'
* commit '0940b748bdba36c4894fc8ea6be631d821fdf578':
qsvdec: Only warn about unconsumed data if it happens more than once
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r-- | libavcodec/qsvdec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 5f6ea5ae6c..d6adcdc335 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -330,8 +330,12 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q, /* 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) { - ff_qsv_print_warning(avctx, ret, "A decode call did not consume any data"); bs.DataOffset = avpkt->size; + ++q->zero_consume_run; + if (q->zero_consume_run > 1) + ff_qsv_print_warning(avctx, ret, "A decode call did not consume any data"); + } else { + q->zero_consume_run = 0; } if (*sync) { |