mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
Caps with empty props (which is not NULL - gst_props_new_empty()) can result in an invalid string, so we need to chec...
Original commit message from CVS: Caps with empty props (which is not NULL - gst_props_new_empty()) can result in an invalid string, so we need to check for empty props (as opposed to NULL props) too.
This commit is contained in:
parent
a0c36796ed
commit
b96f885fa1
1 changed files with 7 additions and 4 deletions
|
@ -86,10 +86,13 @@ gst_caps_to_string (GstCaps *caps)
|
|||
g_value_set_boxed (&value, caps->properties);
|
||||
props = g_strdup_value_contents (&value);
|
||||
|
||||
g_value_unset (&value);
|
||||
g_string_append (result, ", ");
|
||||
g_string_append (result, props);
|
||||
g_free (props);
|
||||
/* this happens with empty (but existing) caps->properties */
|
||||
if (props[0] != '\0') {
|
||||
g_value_unset (&value);
|
||||
g_string_append (result, ", ");
|
||||
g_string_append (result, props);
|
||||
g_free (props);
|
||||
}
|
||||
}
|
||||
|
||||
caps = caps->next;
|
||||
|
|
Loading…
Reference in a new issue