matroskademux: skip empty tags

instead of trying to add tags with empty strings, which
causes criticals at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=690358
This commit is contained in:
Tim-Philipp Müller 2012-12-17 22:55:12 +00:00
parent c49dede772
commit f4cb0c4315

View file

@ -2015,14 +2015,14 @@ gst_matroska_read_common_parse_metadata_id_simple_tag (GstMatroskaReadCommon *
DEBUG_ELEMENT_STOP (common, ebml, "SimpleTag", ret); DEBUG_ELEMENT_STOP (common, ebml, "SimpleTag", ret);
if (parent && tag && value) { if (parent && tag && value && *value != '\0') {
/* Don't bother mapping children tags - parent will do that */ /* Don't bother mapping children tags - parent will do that */
gchar *key_val; gchar *key_val;
/* TODO: read LANGUAGE sub-tag, and use "key[lc]=val" form */ /* TODO: read LANGUAGE sub-tag, and use "key[lc]=val" form */
key_val = g_strdup_printf ("%s=%s", name_with_parent, value); key_val = g_strdup_printf ("%s=%s", name_with_parent, value);
gst_tag_list_add (*p_taglist, GST_TAG_MERGE_APPEND, gst_tag_list_add (*p_taglist, GST_TAG_MERGE_APPEND,
GST_TAG_EXTENDED_COMMENT, key_val, NULL); GST_TAG_EXTENDED_COMMENT, key_val, NULL);
} else if (tag && value) { } else if (tag && value && *value != '\0') {
gboolean matched = FALSE; gboolean matched = FALSE;
guint i; guint i;