diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-07-14 12:52:20 +0200 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2016-11-04 18:56:01 +0000 |
commit | fb240a6276fa36fe120aadd67b4ca774e354f22b (patch) | |
tree | 3d246763eb6a6c79239d43efd6c5806188bede44 | |
parent | db23fde7849aba272509345b63463494582d9530 (diff) | |
download | ffmpeg-fb240a6276fa36fe120aadd67b4ca774e354f22b.tar.gz |
qsvenc: do not re-execute encoding on all positive status codes
It should only be done for DEVICE_BUSY/IN_EXECUTION
(cherry picked from commit 0956fd460681e8ccbdae19f135f0d3970bf95c2f)
Fixes ticket #5924.
-rw-r--r-- | libavcodec/qsvenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 7445d5b122..ac443c1a26 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -982,7 +982,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, ret = MFXVideoENCODE_EncodeFrameAsync(q->session, enc_ctrl, surf, bs, sync); if (ret == MFX_WRN_DEVICE_BUSY) av_usleep(500); - } while (ret > 0); + } while (ret == MFX_WRN_DEVICE_BUSY || ret == MFX_WRN_IN_EXECUTION); if (ret < 0) { av_packet_unref(&new_pkt); |