mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 08:26:39 +00:00
gst/gstvalue.c: print a g_warning when someone ties to add the same value (as per gst_value_compare) to a list twice.
Original commit message from CVS: * gst/gstvalue.c: (gst_value_list_append_value): print a g_warning when someone ties to add the same value (as per gst_value_compare) to a list twice.
This commit is contained in:
parent
b7e0552699
commit
7381ded8a5
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-06-01 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/gstvalue.c: (gst_value_list_append_value):
|
||||||
|
print a g_warning when someone ties to add the same value (as per
|
||||||
|
gst_value_compare) to a list twice.
|
||||||
|
|
||||||
2005-05-17 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-05-17 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* docs/manual/advanced-schedulers.xml:
|
* docs/manual/advanced-schedulers.xml:
|
||||||
|
|
|
@ -242,6 +242,25 @@ gst_value_list_append_value (GValue * value, const GValue * append_value)
|
||||||
|
|
||||||
g_return_if_fail (GST_VALUE_HOLDS_LIST (value)
|
g_return_if_fail (GST_VALUE_HOLDS_LIST (value)
|
||||||
|| GST_VALUE_HOLDS_FIXED_LIST (value));
|
|| GST_VALUE_HOLDS_FIXED_LIST (value));
|
||||||
|
#ifndef G_DISABLE_CHECKS
|
||||||
|
G_STMT_START {
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
for (i = 0; i < gst_value_list_get_size (value); i++) {
|
||||||
|
const GValue *v = gst_value_list_get_value (value, i);
|
||||||
|
|
||||||
|
if (gst_value_compare (v, append_value) == GST_VALUE_EQUAL) {
|
||||||
|
gchar *s = gst_value_serialize (append_value);
|
||||||
|
|
||||||
|
g_warning ("attempting to add value %s to list twice",
|
||||||
|
GST_STR_NULL (s));
|
||||||
|
g_free (s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
G_STMT_END;
|
||||||
|
#endif
|
||||||
|
|
||||||
gst_value_init_and_copy (&val, append_value);
|
gst_value_init_and_copy (&val, append_value);
|
||||||
g_array_append_vals ((GArray *) value->data[0].v_pointer, &val, 1);
|
g_array_append_vals ((GArray *) value->data[0].v_pointer, &val, 1);
|
||||||
|
|
Loading…
Reference in a new issue