aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/qsvenc.c
diff options
context:
space:
mode:
authorAnton Khirnov2016-07-14 12:56:35 +0200
committerAnton Khirnov2016-07-22 19:08:13 +0200
commit8e07c22e508b349d145b9f142aa3ee8b3ce1d3a4 (patch)
tree1fecbd34359ad66ce31ffb498d1f734ddf3e4302 /libavcodec/qsvenc.c
parent0956fd460681e8ccbdae19f135f0d3970bf95c2f (diff)
qsvenc: print warnings from encode/init
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r--libavcodec/qsvenc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 4697e1d1d1..ba07db6e99 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -794,6 +794,9 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
if (ret < 0)
return ff_qsv_print_error(avctx, ret,
"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);
if (ret < 0) {
@@ -974,6 +977,9 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
av_usleep(1);
} 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) {
av_packet_unref(&new_pkt);
av_freep(&bs);