We should use the traget ExtensionProfile's IDC to check the
profile_compatibility_flag, rather than the profile_idc in the
stream. The old profile_compatibility_flag check always return
true. This causes that profiles with same constraint flags but
different profile_idc can't be recognized correctly. For example,
the screen-extended-main-444 profile is always be recognized as
the high-throughput-444 profile.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1121>
if (extra_constraints == 0 &&
(p.profile_idc == ptl->profile_idc
- || ptl->profile_compatibility_flag[ptl->profile_idc])) {
+ || ptl->profile_compatibility_flag[p.profile_idc])) {
result = p.profile;
break;
}