mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
gst/gstcaps.c: Code cleanups.
Original commit message from CVS: * gst/gstcaps.c: (gst_caps_structure_is_subset_field): Code cleanups. Fix memleak.
This commit is contained in:
parent
ab00f16f12
commit
cf85710b39
2 changed files with 12 additions and 21 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2006-08-29 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstcaps.c: (gst_caps_structure_is_subset_field):
|
||||||
|
Code cleanups.
|
||||||
|
Fix memleak.
|
||||||
|
|
||||||
2006-08-29 Tim-Philipp Müller <tim at centricular dot net>
|
2006-08-29 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/gstxml.c:
|
* gst/gstxml.c:
|
||||||
|
|
|
@ -494,43 +494,28 @@ gst_caps_structure_is_subset_field (GQuark field_id, const GValue * value,
|
||||||
/* field is missing in one set */
|
/* field is missing in one set */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/*{
|
|
||||||
gchar *str = g_strdup_value_contents (value);
|
|
||||||
GST_DEBUG (" value: '%s'", str);
|
|
||||||
g_free (str);
|
|
||||||
str = g_strdup_value_contents (other);
|
|
||||||
GST_DEBUG (" other: '%s'", str);
|
|
||||||
g_free (str);
|
|
||||||
} */
|
|
||||||
/*
|
/*
|
||||||
[1,2] - 1 = 2
|
* [1,2] - 1 = 2
|
||||||
1 - [1,2] = <EFBFBD> ???
|
* 1 - [1,2] = ???
|
||||||
*/
|
*/
|
||||||
if (!gst_value_subtract (&subtraction, other, value)) {
|
if (!gst_value_subtract (&subtraction, other, value)) {
|
||||||
/* empty result -> values are the same, or first was a value and
|
/* empty result -> values are the same, or first was a value and
|
||||||
* second was a list
|
* second was a list
|
||||||
*/
|
* verify that result is empty by swapping args */
|
||||||
/* verify that result is empty by swapping args */
|
|
||||||
if (!gst_value_subtract (&subtraction, value, other)) {
|
if (!gst_value_subtract (&subtraction, value, other)) {
|
||||||
/*GST_DEBUG (" values are the same"); */
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
g_value_unset (&subtraction);
|
g_value_unset (&subtraction);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
/*{
|
|
||||||
gchar *str = g_strdup_value_contents (&subtraction);
|
|
||||||
GST_DEBUG (" diff: '%s'", str);
|
|
||||||
g_free (str);
|
|
||||||
} */
|
|
||||||
res = gst_value_compare (&subtraction, other);
|
res = gst_value_compare (&subtraction, other);
|
||||||
|
g_value_unset (&subtraction);
|
||||||
|
|
||||||
if (res == GST_VALUE_EQUAL) {
|
if (res == GST_VALUE_EQUAL) {
|
||||||
/* value was empty ? */
|
/* value was empty ? */
|
||||||
g_value_unset (&subtraction);
|
|
||||||
/*GST_DEBUG (" compare = equal (%d)",res); */
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
/*GST_DEBUG (" compare = unequal/unordered (%d)",res); */
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue