From a583b63722d2397914ad2e774df0ea6ba2b9d8ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 3 Nov 2011 09:56:14 +0100 Subject: [PATCH] Revert "playsinkaudioconvert: Fix warning when there is no target pad yet" This reverts commit f35c51c14915729f0fdf2b348f351ea7e81027cc. Better patch coming soon. --- gst/playback/gstplaysinkaudioconvert.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gst/playback/gstplaysinkaudioconvert.c b/gst/playback/gstplaysinkaudioconvert.c index 2441bfe..2c28c6e 100644 --- a/gst/playback/gstplaysinkaudioconvert.c +++ b/gst/playback/gstplaysinkaudioconvert.c @@ -348,18 +348,13 @@ gst_play_sink_audio_convert_getcaps (GstPad * pad) GstPlaySinkAudioConvert *self = GST_PLAY_SINK_AUDIO_CONVERT (gst_pad_get_parent (pad)); GstCaps *ret; - GstPad *otherpad, *peer = NULL; + GstPad *otherpad, *peer; GST_PLAY_SINK_AUDIO_CONVERT_LOCK (self); otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad)); GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self); - if (otherpad) { - peer = gst_pad_get_peer (otherpad); - gst_object_unref (otherpad); - otherpad = NULL; - } - + peer = gst_pad_get_peer (otherpad); if (peer) { ret = gst_pad_get_caps_reffed (peer); gst_object_unref (peer); @@ -367,6 +362,7 @@ gst_play_sink_audio_convert_getcaps (GstPad * pad) ret = gst_caps_new_any (); } + gst_object_unref (otherpad); gst_object_unref (self); return ret; -- 2.7.4