summaryrefslogtreecommitdiff
path: root/libavcodec/vaapi_encode.c
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2018-02-06 16:17:17 +0800
committerMark Thompson <sw@jkqxz.net>2018-03-08 00:30:23 +0000
commit00ae5c1d3d87efc7f13b86cce80e139c805db179 (patch)
tree3f40496d27cee5ef544a74b69b244ab9694a2ac8 /libavcodec/vaapi_encode.c
parent823a758543e2b1052cdcff22d02d396f4e0792f9 (diff)
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: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/vaapi_encode.c')
-rw-r--r--libavcodec/vaapi_encode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index f5785ce4c5..36c85a3815 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -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;