mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +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");
|
||||
|
||||
profile = GST_VAAPI_PROFILE_UNKNOWN;
|
||||
|
||||
/* Try Main profile coding tools */
|
||||
if (encoder->max_profile_idc < 100) {
|
||||
encoder->use_dct8x8 = FALSE;
|
||||
|
@ -1018,8 +1020,10 @@ ensure_profile_limits (GstVaapiEncoderH264 * encoder)
|
|||
profile = GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE;
|
||||
}
|
||||
|
||||
encoder->profile = profile;
|
||||
encoder->profile_idc = encoder->max_profile_idc;
|
||||
if (profile) {
|
||||
encoder->profile = profile;
|
||||
encoder->profile_idc = encoder->max_profile_idc;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue