mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
gst/gstvalue.c: If needed, allocate storage in the destination value during collection.
Original commit message from CVS: * gst/gstvalue.c: (gst_value_collect_fraction_range): If needed, allocate storage in the destination value during collection.
This commit is contained in:
parent
891d05bc03
commit
2e248d331c
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-11-22 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/gstvalue.c: (gst_value_collect_fraction_range):
|
||||
If needed, allocate storage in the destination value during
|
||||
collection.
|
||||
|
||||
2005-11-22 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
|
|
|
@ -956,9 +956,14 @@ gst_value_collect_fraction_range (GValue * value, guint n_collect_values,
|
|||
if (n_collect_values != 4)
|
||||
return g_strdup_printf ("not enough value locations for `%s' passed",
|
||||
G_VALUE_TYPE_NAME (value));
|
||||
if (vals == NULL)
|
||||
return g_strdup_printf ("Uninitialised `%s' passed",
|
||||
G_VALUE_TYPE_NAME (value));
|
||||
if (vals == NULL) {
|
||||
value->data[0].v_pointer = vals = g_new0 (GValue, 2);
|
||||
if (vals == NULL)
|
||||
return g_strdup_printf ("Could not initialise`%s' during collect",
|
||||
G_VALUE_TYPE_NAME (value));
|
||||
g_value_init (&vals[0], GST_TYPE_FRACTION);
|
||||
g_value_init (&vals[1], GST_TYPE_FRACTION);
|
||||
}
|
||||
|
||||
gst_value_set_fraction (&vals[0], collect_values[0].v_int,
|
||||
collect_values[1].v_int);
|
||||
|
|
Loading…
Reference in a new issue