[FFmpeg-devel] [PATCH] qsvenc: do not re-execute encoding on all positive status codes
Ivan Uskov
ivan.uskov at nablet.com
Fri Nov 4 18:39:11 EET 2016
Hello Mark,
Thursday, November 3, 2016, 10:55:05 PM, you wrote:
> From: Anton Khirnov <anton at khirnov.net>
> It should only be done for DEVICE_BUSY/IN_EXECUTION
> (cherry picked from commit 0956fd460681e8ccbdae19f135f0d3970bf95c2f)
> Fixes ticket #5924.
> ---
> libavcodec/qsvenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 7445d5b..ac443c1 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);
I'm agree, existing check is not correct.
LGTM.
--
Best regards,
Ivan mailto:ivan.uskov at nablet.com
More information about the ffmpeg-devel
mailing list