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

Introduced by fbef9220d3. The code there
is only correct for elements we get from signals.
This commit is contained in:
Sebastian Dröge 2018-07-25 14:23:36 +03:00
parent ab2548d78d
commit 58ac815eae
4 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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:

View file

@ -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)