mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
codecparsers: h265parser: return invalid profile if len is 0.
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>
This commit is contained in:
parent
9eb0f8501f
commit
05ee44b62b
1 changed files with 6 additions and 2 deletions
|
@ -3726,11 +3726,15 @@ gst_h265_profile_tier_level_get_profiles (const GstH265ProfileTierLevel * ptl,
|
|||
GstH265Profile
|
||||
gst_h265_profile_tier_level_get_profile (const GstH265ProfileTierLevel * ptl)
|
||||
{
|
||||
guint len;
|
||||
guint len = 0;
|
||||
GstH265Profile profiles[GST_H265_PROFILE_MAX] = { GST_H265_PROFILE_INVALID, };
|
||||
|
||||
gst_h265_profile_tier_level_get_profiles (ptl, profiles, &len);
|
||||
return profiles[0];
|
||||
|
||||
if (len > 0)
|
||||
return profiles[0];
|
||||
|
||||
return GST_H265_PROFILE_INVALID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue