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.
Change-Id: Id0a7b26e7cf6e6b5473e7208477a0f00af30a78c
Origin: upstream
Bug-Tizen: TC-2113/part
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;
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;
}