don't pass pointers to automatic variables

Original commit message from CVS:
don't pass pointers to automatic variables
This commit is contained in:
Andy Wingo 2002-09-02 18:49:40 +00:00
parent f876b446b0
commit 16787e78c0

View file

@ -315,7 +315,7 @@ gst_element_default_error (GObject *object, GstObject *orig, gchar *error)
typedef struct {
const GParamSpec *pspec;
const GValue *value;
GValue value;
} prop_value_t;
static void
@ -324,7 +324,7 @@ element_set_property (GstElement *element, const GParamSpec *pspec, const GValue
prop_value_t *prop_value = g_new0 (prop_value_t, 1);
prop_value->pspec = pspec;
prop_value->value = value;
prop_value->value = *value;
g_async_queue_push (element->prop_value_queue, prop_value);
}
@ -405,7 +405,8 @@ gst_element_set_pending_properties (GstElement *element)
prop_value_t *prop_value;
while ((prop_value = g_async_queue_try_pop (element->prop_value_queue))) {
g_object_set_property ((GObject*)element, prop_value->pspec->name, prop_value->value);
g_object_set_property ((GObject*)element, prop_value->pspec->name, &prop_value->value);
g_value_unset (&prop_value->value);
g_free (prop_value);
}
}