mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
miniobject: The GValue collection function can not assume that the destination is initialized
...and it will usually be either filled by zeroes or random values. Fixes bug #607283.
This commit is contained in:
parent
743cde4b49
commit
ed1247b561
1 changed files with 8 additions and 3 deletions
|
@ -430,8 +430,8 @@ gst_value_mini_object_copy (const GValue * src_value, GValue * dest_value)
|
||||||
{
|
{
|
||||||
if (src_value->data[0].v_pointer) {
|
if (src_value->data[0].v_pointer) {
|
||||||
dest_value->data[0].v_pointer =
|
dest_value->data[0].v_pointer =
|
||||||
gst_mini_object_ref (GST_MINI_OBJECT_CAST (src_value->
|
gst_mini_object_ref (GST_MINI_OBJECT_CAST (src_value->data[0].
|
||||||
data[0].v_pointer));
|
v_pointer));
|
||||||
} else {
|
} else {
|
||||||
dest_value->data[0].v_pointer = NULL;
|
dest_value->data[0].v_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,12 @@ static gchar *
|
||||||
gst_value_mini_object_collect (GValue * value, guint n_collect_values,
|
gst_value_mini_object_collect (GValue * value, guint n_collect_values,
|
||||||
GTypeCValue * collect_values, guint collect_flags)
|
GTypeCValue * collect_values, guint collect_flags)
|
||||||
{
|
{
|
||||||
gst_value_set_mini_object (value, collect_values[0].v_pointer);
|
if (collect_values[0].v_pointer) {
|
||||||
|
value->data[0].v_pointer =
|
||||||
|
gst_mini_object_ref (collect_values[0].v_pointer);
|
||||||
|
} else {
|
||||||
|
value->data[0].v_pointer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue