mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
pbutils: description: fix MPEG-2 video profiles in description
We would accidentally use the profile nick as profile name in the description for MPEG video that's not version 4.
This commit is contained in:
parent
0487e1548d
commit
f0f6bd4910
1 changed files with 12 additions and 0 deletions
|
@ -348,6 +348,14 @@ pbutils_desc_get_profile_name_from_nick (const gchar * map, gsize map_len,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
pbutils_desc_get_mpeg2v_profile_name_from_nick (const gchar * nick)
|
||||
{
|
||||
const gchar map[] = "simple\000Simple\000main\000Main\000high\000High\000";
|
||||
|
||||
return pbutils_desc_get_profile_name_from_nick (map, sizeof (map), nick);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
pbutils_desc_get_mpeg4v_profile_name_from_nick (const gchar * nick)
|
||||
{
|
||||
|
@ -792,6 +800,10 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
|
|||
if (profile != NULL) {
|
||||
if (ver == 4)
|
||||
profile = pbutils_desc_get_mpeg4v_profile_name_from_nick (profile);
|
||||
else if (ver == 2)
|
||||
profile = pbutils_desc_get_mpeg2v_profile_name_from_nick (profile);
|
||||
else
|
||||
profile = NULL;
|
||||
}
|
||||
if (profile != NULL)
|
||||
return g_strdup_printf ("MPEG-%d Video (%s Profile)", ver, profile);
|
||||
|
|
Loading…
Reference in a new issue