diff options
author | Josep Torra <n770galaxy@gmail.com> | 2012-04-20 17:02:13 +0200 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2012-04-27 12:56:34 +0100 |
commit | 44d5688abec8c9ee2e8ea5854a6092a3ba607205 (patch) | |
tree | f718c640b5f43e736c393a0858485f4ce67f9308 | |
parent | 05f6f02cfed487323e294bc3adeb4a471f814d52 (diff) | |
download | clutter-gst-44d5688abec8c9ee2e8ea5854a6092a3ba607205.tar.gz |
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.
-rw-r--r-- | 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); |