mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
taglist: avoid triggering an assertion
When deserialization of the structure fails, return a NULL taglist instead of asserting.
This commit is contained in:
parent
9e98492e12
commit
f45c84db02
1 changed files with 7 additions and 1 deletions
|
@ -853,11 +853,17 @@ GstTagList *
|
|||
gst_tag_list_new_from_string (const gchar * str)
|
||||
{
|
||||
GstTagList *tag_list;
|
||||
GstStructure *s;
|
||||
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
g_return_val_if_fail (g_str_has_prefix (str, "taglist"), NULL);
|
||||
|
||||
tag_list = gst_tag_list_new_internal (gst_structure_from_string (str, NULL));
|
||||
s = gst_structure_from_string (str, NULL);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
|
||||
tag_list = gst_tag_list_new_internal (s);
|
||||
|
||||
return tag_list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue