+2006-05-26 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * gst/gstvalue.c: (gst_value_deserialize_fraction):
+ Handle NULL input and output pointers silently as a failed conversion,
+ rather than g_warnings.
+
2006-05-25 Wim Taymans <wim@fluendo.com>
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_start):
{
gint num, den;
- if (s && sscanf (s, "%d/%d", &num, &den) == 2) {
+ if (G_UNLIKELY (s == NULL))
+ return FALSE;
+
+ if (G_UNLIKELY (dest == NULL || !GST_VALUE_HOLDS_FRACTION (dest)))
+ return FALSE;
+
+ if (sscanf (s, "%d/%d", &num, &den) == 2) {
gst_value_set_fraction (dest, num, den);
return TRUE;
}
- if (s && sscanf (s, "%d", &num) == 1) {
+ if (sscanf (s, "%d", &num) == 1) {
gst_value_set_fraction (dest, num, 1);
return TRUE;
}