Commit 58ac815e authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

gl: Don't steal callers reference when setting non-floating elements via properties

Introduced by fbef9220. The code there
is only correct for elements we get from signals.
parent ab2548d7
......@@ -245,7 +245,7 @@ gst_gl_filter_bin_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_FILTER:
gst_gl_filter_bin_set_filter (self, g_value_get_object (value));
gst_gl_filter_bin_set_filter (self, g_value_dup_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......
......@@ -473,7 +473,7 @@ gst_gl_mixer_bin_set_property (GObject * object,
switch (prop_id) {
case PROP_MIXER:
{
GstElement *mixer = g_value_get_object (value);
GstElement *mixer = g_value_dup_object (value);
/* FIXME: deal with replacing a mixer */
g_return_if_fail (!self->mixer || (self->mixer == mixer));
gst_gl_mixer_bin_set_mixer (self, mixer);
......
......@@ -347,7 +347,7 @@ gst_gl_sink_bin_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_SINK:
gst_gl_sink_bin_set_sink (self, g_value_get_object (value));
gst_gl_sink_bin_set_sink (self, g_value_dup_object (value));
break;
case PROP_CONTRAST:
case PROP_BRIGHTNESS:
......
......@@ -221,7 +221,7 @@ gst_gl_src_bin_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case PROP_SRC:
gst_gl_src_bin_set_src (self, g_value_get_object (value));
gst_gl_src_bin_set_src (self, g_value_dup_object (value));
break;
default:
if (self->src)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment