summaryrefslogtreecommitdiff
path: root/clutter-gst/clutter-gst-video-sink.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2011-10-27 19:23:41 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2011-10-28 12:03:36 +0100
commit61b21e5c6d17998fbafe26db8ee68cfebb414585 (patch)
treeaff3095103b83a5a882a477cf560efc63211d0f0 /clutter-gst/clutter-gst-video-sink.c
parentf4039d9cca39b46ff3a054cf8fee8994a7ebeb56 (diff)
downloadclutter-gst-61b21e5c6d17998fbafe26db8ee68cfebb414585.tar.gz
sink: Make the sink hold a weak reference to the ClutterTexture
The sink does not need to hold a reference to the Texture, it better to leave the life cycle of the ClutterTexture entirely to Clutter. If the texture disapears when the sink is still live and pushing buffers to it, you will get warnings not nothing dramatic. It's your responsibility to ensure the GStreamer pipeline has been stopped when removing/destroying the texture. (cherry picked from commit ddbb091b4a4d4cce0f3b324819af975a246faf4d)
Diffstat (limited to 'clutter-gst/clutter-gst-video-sink.c')
-rw-r--r--clutter-gst/clutter-gst-video-sink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 39f4de8..2f51768 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -1189,7 +1189,6 @@ clutter_gst_video_sink_set_texture (ClutterGstVideoSink *sink,
g_signal_handler_disconnect (priv->texture, id);
}
g_array_set_size (priv->signal_handler_ids, 0);
- g_object_unref (priv->texture);
}
priv->texture = texture;
@@ -1219,7 +1218,7 @@ clutter_gst_video_sink_set_property (GObject *object,
switch (prop_id)
{
case PROP_TEXTURE:
- clutter_gst_video_sink_set_texture (sink, g_value_dup_object (value));
+ clutter_gst_video_sink_set_texture (sink, g_value_get_object (value));
break;
case PROP_UPDATE_PRIORITY:
clutter_gst_video_sink_set_priority (sink, g_value_get_int (value));