Commit 0956fd46 authored by Anton Khirnov's avatar Anton Khirnov

qsvenc: do not re-execute encoding on all positive status codes

It should only be done for DEVICE_BUSY/IN_EXECUTION
parent 95414eb2
......@@ -972,7 +972,7 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
ret = MFXVideoENCODE_EncodeFrameAsync(q->session, NULL, surf, bs, sync);
if (ret == MFX_WRN_DEVICE_BUSY)
av_usleep(1);
} while (ret > 0);
} while (ret == MFX_WRN_DEVICE_BUSY || ret == MFX_WRN_IN_EXECUTION);
if (ret < 0) {
av_packet_unref(&new_pkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment