Merge commit 'aa9d15d89b'
* commit 'aa9d15d89b':
qsvdec: avoid an infinite loop with no consumed data and no output
Conflicts:
libavcodec/qsvdec.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
commit
ef2a85ac53
1 changed files with 7 additions and 0 deletions
|
|
@ -339,6 +339,13 @@ int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q,
|
|||
break;
|
||||
}
|
||||
|
||||
/* 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 (buffered) {
|
||||
qsv_fifo_relocate(q->input_fifo, bs.DataOffset);
|
||||
} else if (bs.DataOffset!=avpkt->size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue