summaryrefslogtreecommitdiff
path: root/libavcodec/qsvenc.c
diff options
context:
space:
mode:
authorMaxym Dmytrychenko <maxym.dmytrychenko@intel.com>2015-12-18 14:24:36 +0100
committerAnton Khirnov <anton@khirnov.net>2016-01-07 08:20:21 +0100
commita6259a6ecbad18d58085e4ab23f56151e98d7b53 (patch)
tree8c05905e39c6162e13af44942e668bb6343cc202 /libavcodec/qsvenc.c
parent63f7f8d1dbf6ce27440fdd56ef38c822fb11b9c2 (diff)
qsvenc: properly handle the warning from MFXVideoCORE_SyncOperation
Same as what is done in 3b6473b43eb69fc3faaf69f7fd0b83b51db7607f. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r--libavcodec/qsvenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index f19ca760c8..cda11fac8f 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -919,7 +919,9 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
av_fifo_generic_read(q->async_fifo, &sync, sizeof(sync), NULL);
av_fifo_generic_read(q->async_fifo, &bs, sizeof(bs), NULL);
- MFXVideoCORE_SyncOperation(q->session, sync, 60000);
+ do {
+ ret = MFXVideoCORE_SyncOperation(q->session, sync, 1000);
+ } while (ret == MFX_WRN_IN_EXECUTION);
new_pkt.dts = av_rescale_q(bs->DecodeTimeStamp, (AVRational){1, 90000}, avctx->time_base);
new_pkt.pts = av_rescale_q(bs->TimeStamp, (AVRational){1, 90000}, avctx->time_base);