Fixed memory leaks in Close()

This commit is contained in:
Stephan Sundermann committed 2013-03-01 17:42:48 +01:00
1 parent 0594871404
commit 1f01e27135
1 file changed
+9 -8
+9 -8
View File
@@ -93,21 +93,22 @@ void GstreamerAudioStream::Close(void)
{ {
if(Element) if(Element)
gst_element_set_state(Element, GST_STATE_NULL); gst_element_set_state(Element, GST_STATE_NULL);
if(Bus) if(Bus)
g_object_unref(Bus); gst_object_unref(Bus);
if(Element) if(Element)
g_object_unref(Element); gst_object_unref(Element);
if(Message)
gst_message_unref(Message);
if(Convert) if(Convert)
g_object_unref(Convert); gst_object_unref(Convert);
if(Audiosink) if(Audiosink)
g_object_unref(Audiosink); gst_object_unref(Audiosink);
if(Pad) if(Pad)
g_object_unref(Pad); gst_object_unref(Pad);
if(GhostPad) if(GhostPad)
g_object_unref(GhostPad); gst_object_unref(GhostPad);
if(SinkBin) if(SinkBin)
g_object_unref(SinkBin); gst_object_unref(SinkBin);
if(FadeTimer) if(FadeTimer)
g_timer_destroy (FadeTimer); g_timer_destroy (FadeTimer);