Commit 00ae5c1d authored by Haihao Xiang's avatar Haihao Xiang Committed by Mark Thompson

lavc/vaapi_encode: Don't return error if the underlying driver doesn't support B frames

The underlying driver need not support B frames - since they are enabled
by default for some codecs, it is better to disable them rather than
returning an error in this case.  This makes the default settings usable
for low-power encoding on Intel platforms.
Signed-off-by: 's avatarHaihao Xiang <haihao.xiang@intel.com>
Signed-off-by: 's avatarMark Thompson <sw@jkqxz.net>
parent 823a7585
......@@ -1096,10 +1096,10 @@ static av_cold int vaapi_encode_config_attributes(AVCodecContext *avctx)
goto fail;
}
if (avctx->max_b_frames > 0 && ref_l1 < 1) {
av_log(avctx, AV_LOG_ERROR, "B frames are not "
"supported (%#x).\n", attr[i].value);
err = AVERROR(EINVAL);
goto fail;
av_log(avctx, AV_LOG_WARNING, "B frames are not "
"supported (%#x) by the underlying driver.\n",
attr[i].value);
avctx->max_b_frames = 0;
}
}
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment