taglist: check value type matches tag type when adding values to a taglist

This commit is contained in:
Tim-Philipp Müller 2012-07-14 19:08:24 +01:00
parent 379c3cd184
commit 48d0d28755

View file

@ -964,6 +964,14 @@ gst_tag_list_add_value_internal (GstTagList * tag_list, GstTagMergeMode mode,
}
}
if (G_UNLIKELY (!G_VALUE_HOLDS (value, info->type) &&
!GST_VALUE_HOLDS_LIST (value))) {
g_warning ("tag '%s' should hold value of type '%s', but value of "
"type '%s' passed", info->nick, g_type_name (info->type),
g_type_name (G_VALUE_TYPE (value)));
return;
}
tag_quark = info->name_quark;
if (info->merge_func