Though the profiles[0] is inited as GST_H265_PROFILE_INVALID in the gst_h265_profile_tier_level_get_profile(), the profile detecting may change its content later. So the return of profiles[0] may not be an invalid profile even the len is 0. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1517>