]> git.0d.be Git - empathy.git/commitdiff
audio-sink: don't unref subpad
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 28 Feb 2012 15:50:05 +0000 (16:50 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 28 Feb 2012 15:52:56 +0000 (16:52 +0100)
Part of my commit ed191caba6658b580db78a1802f2c8293e4564fb was wrong.
subpad is added to the bin so gst_element_add_pad() takes its reference.

https://bugzilla.gnome.org/show_bug.cgi?id=670745

src/empathy-audio-sink.c

index b4680a0fb824545451c6e296478ca46f55fa6a2d..2968fb53c5341d0447275e56d83b4af49463e35a 100644 (file)
@@ -301,7 +301,7 @@ empathy_audio_sink_request_new_pad (GstElement *element,
   EmpathyGstAudioSink *self = EMPATHY_GST_AUDIO_SINK (element);
   GstElement *bin, *resample, *audioconvert0, *audioconvert1;
   GstPad *pad = NULL;
-  GstPad *subpad = NULL, *filterpad;
+  GstPad *subpad, *filterpad;
 
   bin = gst_bin_new (NULL);
 
@@ -364,7 +364,6 @@ empathy_audio_sink_request_new_pad (GstElement *element,
 
   pad = gst_ghost_pad_new (name, subpad);
   g_assert (pad != NULL);
-  gst_object_unref (subpad);
 
   if (!gst_element_sync_state_with_parent (bin))
     goto error;
@@ -383,8 +382,6 @@ error:
       gst_object_unref (pad);
     }
 
-  tp_clear_pointer (&subpad, gst_object_unref);
-
   gst_object_unref (bin);
   g_warning ("Failed to create output subpipeline");
   return NULL;