|
|
@ -784,6 +784,9 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q) |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ff_qsv_print_error(avctx, ret, |
|
|
|
return ff_qsv_print_error(avctx, ret, |
|
|
|
"Error initializing the encoder"); |
|
|
|
"Error initializing the encoder"); |
|
|
|
|
|
|
|
else if (ret > 0) |
|
|
|
|
|
|
|
ff_qsv_print_warning(avctx, ret, |
|
|
|
|
|
|
|
"Warning in encoder initialization"); |
|
|
|
|
|
|
|
|
|
|
|
ret = qsv_retrieve_enc_params(avctx, q); |
|
|
|
ret = qsv_retrieve_enc_params(avctx, q); |
|
|
|
if (ret < 0) { |
|
|
|
if (ret < 0) { |
|
|
@ -991,6 +994,9 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q, |
|
|
|
av_usleep(500); |
|
|
|
av_usleep(500); |
|
|
|
} while (ret == MFX_WRN_DEVICE_BUSY || ret == MFX_WRN_IN_EXECUTION); |
|
|
|
} while (ret == MFX_WRN_DEVICE_BUSY || ret == MFX_WRN_IN_EXECUTION); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ret > 0) |
|
|
|
|
|
|
|
ff_qsv_print_warning(avctx, ret, "Warning during encoding"); |
|
|
|
|
|
|
|
|
|
|
|
if (ret < 0) { |
|
|
|
if (ret < 0) { |
|
|
|
av_packet_unref(&new_pkt); |
|
|
|
av_packet_unref(&new_pkt); |
|
|
|
av_freep(&bs); |
|
|
|
av_freep(&bs); |
|
|
|