mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-21 14:53:10 +00:00
libavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFrameAsync
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b160fc290c
commit
5985316fba
@ -417,12 +417,20 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
|
|||||||
break;
|
break;
|
||||||
} while ( 1 );
|
} while ( 1 );
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
return (ret == MFX_ERR_MORE_DATA) ? 0 : ff_qsv_error(ret);
|
if (ret == MFX_ERR_MORE_DATA)
|
||||||
|
return 0;
|
||||||
if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame->interlaced_frame)
|
av_log(avctx, AV_LOG_ERROR, "EncodeFrameAsync returned %d\n", ret);
|
||||||
print_interlace_msg(avctx, q);
|
return ff_qsv_error(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM) {
|
||||||
|
if (frame->interlaced_frame)
|
||||||
|
print_interlace_msg(avctx, q);
|
||||||
|
else
|
||||||
|
av_log(avctx, AV_LOG_WARNING,
|
||||||
|
"EncodeFrameAsync returned 'incompatible param' code\n");
|
||||||
|
}
|
||||||
if (sync) {
|
if (sync) {
|
||||||
MFXVideoCORE_SyncOperation(q->session, sync, 60000);
|
MFXVideoCORE_SyncOperation(q->session, sync, 60000);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user