mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
encoder: h264: fix profile limits.
Fix ensure_profile_limits() to lower profile to the desired limits, only if the latter are actually known and the profile needed to be changed to fit.
This commit is contained in:
parent
4be370f9ed
commit
669e33418e
1 changed files with 6 additions and 2 deletions
|
@ -1005,6 +1005,8 @@ ensure_profile_limits (GstVaapiEncoderH264 * encoder)
|
||||||
|
|
||||||
GST_WARNING ("lowering coding tools to meet target decoder constraints");
|
GST_WARNING ("lowering coding tools to meet target decoder constraints");
|
||||||
|
|
||||||
|
profile = GST_VAAPI_PROFILE_UNKNOWN;
|
||||||
|
|
||||||
/* Try Main profile coding tools */
|
/* Try Main profile coding tools */
|
||||||
if (encoder->max_profile_idc < 100) {
|
if (encoder->max_profile_idc < 100) {
|
||||||
encoder->use_dct8x8 = FALSE;
|
encoder->use_dct8x8 = FALSE;
|
||||||
|
@ -1018,8 +1020,10 @@ ensure_profile_limits (GstVaapiEncoderH264 * encoder)
|
||||||
profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
|
profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (profile) {
|
||||||
encoder->profile = profile;
|
encoder->profile = profile;
|
||||||
encoder->profile_idc = encoder->max_profile_idc;
|
encoder->profile_idc = encoder->max_profile_idc;
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue