mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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 0956fd4606
)
Fixes ticket #5924.
This commit is contained in:
parent
db23fde784
commit
fb240a6276
@ -982,7 +982,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
|
|||||||
ret = MFXVideoENCODE_EncodeFrameAsync(q->session, enc_ctrl, surf, bs, sync);
|
ret = MFXVideoENCODE_EncodeFrameAsync(q->session, enc_ctrl, surf, bs, sync);
|
||||||
if (ret == MFX_WRN_DEVICE_BUSY)
|
if (ret == MFX_WRN_DEVICE_BUSY)
|
||||||
av_usleep(500);
|
av_usleep(500);
|
||||||
} while (ret > 0);
|
} while (ret == MFX_WRN_DEVICE_BUSY || ret == MFX_WRN_IN_EXECUTION);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_packet_unref(&new_pkt);
|
av_packet_unref(&new_pkt);
|
||||||
|
Loading…
Reference in New Issue
Block a user