X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fvaapi_encode_h264.c;h=efde80b08ee9c674c3582b79f88a588be8854bbb;hb=7d2882bf52a66f52f1d978782b378427a32221bd;hp=549867ef3f51b09795c3f13c546cd9bc305b3be7;hpb=b35f6d3aa359567fa4572a1a982ec6d233929d35;p=ffmpeg diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 549867ef3f5..efde80b08ee 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -1175,6 +1175,10 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) ctx->codec = &vaapi_encode_type_h264; switch (avctx->profile) { + case FF_PROFILE_H264_BASELINE: + av_log(avctx, AV_LOG_WARNING, "H.264 baseline profile is not " + "supported, using constrained baseline profile instead.\n"); + avctx->profile = FF_PROFILE_H264_CONSTRAINED_BASELINE; case FF_PROFILE_H264_CONSTRAINED_BASELINE: ctx->va_profile = VAProfileH264ConstrainedBaseline; if (avctx->max_b_frames != 0) { @@ -1183,14 +1187,6 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) "doesn't support encoding with B frames, disabling them.\n"); } break; - case FF_PROFILE_H264_BASELINE: - ctx->va_profile = VAProfileH264Baseline; - if (avctx->max_b_frames != 0) { - avctx->max_b_frames = 0; - av_log(avctx, AV_LOG_WARNING, "H.264 baseline profile " - "doesn't support encoding with B frames, disabling them.\n"); - } - break; case FF_PROFILE_H264_MAIN: ctx->va_profile = VAProfileH264Main; break;