mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
pbutils: descriptions: default to systemstream=false for partial video/mpeg caps
Assume systemstream=false for video/mpeg caps where that field is missing.
This commit is contained in:
parent
7618699ffd
commit
374e756eee
1 changed files with 9 additions and 4 deletions
|
@ -664,16 +664,21 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
|
||||||
gboolean sysstream;
|
gboolean sysstream;
|
||||||
gint ver = 0;
|
gint ver = 0;
|
||||||
|
|
||||||
if (!gst_structure_get_boolean (s, "systemstream", &sysstream) ||
|
if (!gst_structure_get_boolean (s, "systemstream", &sysstream)) {
|
||||||
!gst_structure_get_int (s, "mpegversion", &ver) || ver < 1 || ver > 4) {
|
GST_WARNING ("Missing systemstream field in mpeg video caps "
|
||||||
GST_WARNING ("Missing fields in mpeg video caps %" GST_PTR_FORMAT, caps);
|
"%" GST_PTR_FORMAT, caps);
|
||||||
} else {
|
sysstream = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gst_structure_get_int (s, "mpegversion", &ver) && ver > 0 && ver <= 4) {
|
||||||
if (sysstream) {
|
if (sysstream) {
|
||||||
return g_strdup_printf ("MPEG-%d System Stream", ver);
|
return g_strdup_printf ("MPEG-%d System Stream", ver);
|
||||||
} else {
|
} else {
|
||||||
return g_strdup_printf ("MPEG-%d Video", ver);
|
return g_strdup_printf ("MPEG-%d Video", ver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GST_WARNING ("Missing mpegversion field in mpeg video caps "
|
||||||
|
"%" GST_PTR_FORMAT, caps);
|
||||||
return g_strdup ("MPEG Video");
|
return g_strdup ("MPEG Video");
|
||||||
} else if (strcmp (info->type, "audio/x-raw") == 0) {
|
} else if (strcmp (info->type, "audio/x-raw") == 0) {
|
||||||
gint depth = 0;
|
gint depth = 0;
|
||||||
|
|
Loading…
Reference in a new issue