From: Wim Taymans Date: Tue, 7 Dec 2010 10:31:30 +0000 (+0100) Subject: use _object_ref_sink() when we can X-Git-Tag: 1.19.3~511^2~7809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f22687bacc04136fae5c934b16395d90c9fa357c;p=platform%2Fupstream%2Fgstreamer.git use _object_ref_sink() when we can --- diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index df470f9..a7ee8ae 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -1159,8 +1159,7 @@ gst_ogg_chain_new_stream (GstOggChain * chain, glong serialno) ret = g_object_new (GST_TYPE_OGG_PAD, NULL); /* we own this one */ - gst_object_ref (ret); - gst_object_sink (ret); + gst_object_ref_sink (ret); GST_PAD_DIRECTION (ret) = GST_PAD_SRC; gst_ogg_pad_mark_discont (ret); diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index fbdfce0..8c27476 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -3294,8 +3294,7 @@ gst_decode_pad_init (GstDecodePad * pad) pad->blocked = FALSE; pad->exposed = FALSE; pad->drained = FALSE; - gst_object_ref (pad); - gst_object_sink (pad); + gst_object_ref_sink (pad); } static void diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 57b5dbe..3aecd7c 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -638,8 +638,7 @@ gst_play_bin_set_property (GObject * object, guint prop_id, } play_bin->video_sink = g_value_get_object (value); if (play_bin->video_sink != NULL) { - gst_object_ref (play_bin->video_sink); - gst_object_sink (GST_OBJECT_CAST (play_bin->video_sink)); + gst_object_ref_sink (play_bin->video_sink); } /* when changing the videosink, we just remove the * video pipeline from the cache so that it will be @@ -656,8 +655,7 @@ gst_play_bin_set_property (GObject * object, guint prop_id, } play_bin->audio_sink = g_value_get_object (value); if (play_bin->audio_sink != NULL) { - gst_object_ref (play_bin->audio_sink); - gst_object_sink (GST_OBJECT_CAST (play_bin->audio_sink)); + gst_object_ref_sink (play_bin->audio_sink); } g_hash_table_remove (play_bin->cache, "abin"); break; @@ -668,8 +666,7 @@ gst_play_bin_set_property (GObject * object, guint prop_id, /* Take ownership */ if (pending_visualisation) { - gst_object_ref (pending_visualisation); - gst_object_sink (pending_visualisation); + gst_object_ref_sink (pending_visualisation); } /* Do we already have a visualisation change pending ? */