Module: libav Branch: master Commit: 7c65a76b16bc3a44f1592acde2176f187a058797
Author: Li, Zhong <[email protected]> Committer: Maxym Dmytrychenko <[email protected]> Date: Thu Dec 7 14:44:27 2017 +0800 lavc/qsvenc: add error messeage if ICQ unsupported. Signed-off-by: Zhong Li <[email protected]> Signed-off-by: Maxym Dmytrychenko <[email protected]> --- libavcodec/qsvenc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index f6034c4..5eacf3c 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -295,6 +295,12 @@ static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q) return AVERROR(EINVAL); } + if (!want_qscale && avctx->global_quality > 0 && !QSV_HAVE_ICQ){ + av_log(avctx, AV_LOG_ERROR, + "ICQ ratecontrol mode requested, but is not supported by this SDK version\n"); + return AVERROR(ENOSYS); + } + if (want_qscale) { rc_mode = MFX_RATECONTROL_CQP; rc_desc = "constant quantization parameter (CQP)"; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
