mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
gst/gstvalue.c: Don't crash if either of the string GValues is empty.
Original commit message from CVS: * gst/gstvalue.c: Don't crash if either of the string GValues is empty.
This commit is contained in:
parent
de6f88f0f0
commit
d27aea0391
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-11-17 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/gstvalue.c:
|
||||
Don't crash if either of the string GValues is empty.
|
||||
|
||||
2008-11-17 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* tools/gst-inspect.c (print_all_uri_handlers): New function,
|
||||
|
|
|
@ -1764,13 +1764,17 @@ gst_value_deserialize_float (GValue * dest, const gchar * s)
|
|||
static gint
|
||||
gst_value_compare_string (const GValue * value1, const GValue * value2)
|
||||
{
|
||||
int x = strcmp (value1->data[0].v_pointer, value2->data[0].v_pointer);
|
||||
if (!value1->data[0].v_pointer || !value2->data[0].v_pointer) {
|
||||
return GST_VALUE_UNORDERED;
|
||||
} else {
|
||||
int x = strcmp (value1->data[0].v_pointer, value2->data[0].v_pointer);
|
||||
|
||||
if (x < 0)
|
||||
return GST_VALUE_LESS_THAN;
|
||||
if (x > 0)
|
||||
return GST_VALUE_GREATER_THAN;
|
||||
return GST_VALUE_EQUAL;
|
||||
if (x < 0)
|
||||
return GST_VALUE_LESS_THAN;
|
||||
if (x > 0)
|
||||
return GST_VALUE_GREATER_THAN;
|
||||
return GST_VALUE_EQUAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* keep in sync with gststructure.c */
|
||||
|
|
Loading…
Reference in a new issue