[clutter-gst] autosink: don't take an extra reference on texture
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst] autosink: don't take an extra reference on texture
- Date: Fri, 27 Apr 2012 11:58:38 +0000 (UTC)
commit 44d5688abec8c9ee2e8ea5854a6092a3ba607205
Author: Josep Torra <n770galaxy gmail com>
Date: Fri Apr 20 17:02:13 2012 +0200
autosink: don't take an extra reference on texture
Fixes pipeline shutdown in video-player example that relies on
videotexture dispose to call set_state(STATE_NULL) on
the pipeline.
clutter-gst/clutter-gst-auto-video-sink.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-auto-video-sink.c b/clutter-gst/clutter-gst-auto-video-sink.c
index 86c7db6..0239d79 100644
--- a/clutter-gst/clutter-gst-auto-video-sink.c
+++ b/clutter-gst/clutter-gst-auto-video-sink.c
@@ -668,11 +668,7 @@ clutter_gst_auto_video_sink_dispose (GObject *object)
bin->sink_block_pad = NULL;
}
- if (bin->texture)
- {
- g_object_unref (bin->texture);
- bin->texture = NULL;
- }
+ bin->texture = NULL;
GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
}
@@ -699,10 +695,6 @@ static void
clutter_gst_auto_video_sink_set_texture (ClutterGstAutoVideoSink *bin,
ClutterTexture *texture)
{
- if (bin->texture)
- {
- g_object_unref (bin->texture);
- }
bin->texture = texture;
if (bin->setup)
{
@@ -721,7 +713,7 @@ clutter_gst_auto_video_sink_set_property (GObject *object,
switch (prop_id)
{
case PROP_TEXTURE:
- clutter_gst_auto_video_sink_set_texture (bin, g_value_dup_object (value));
+ clutter_gst_auto_video_sink_set_texture (bin, g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]