[farsight2/master] Remember if the stream was created and destroy it if it wasnt

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:12 PST 2008


---
 transmitters/nice/fs-nice-stream-transmitter.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index 7375a33..39bc82d 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -74,6 +74,8 @@ struct _FsNiceStreamTransmitterPrivate
 
   FsNiceTransmitter *transmitter;
 
+  gboolean created;
+
   gboolean sending;
 
   gchar *stun_ip;
@@ -234,8 +236,14 @@ fs_nice_stream_transmitter_init (FsNiceStreamTransmitter *self)
 static void
 fs_nice_stream_transmitter_dispose (GObject *object)
 {
-  //FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object);
+  FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object);
 
+  if (self->priv->created)
+  {
+    nice_agent_remove_stream (self->priv->transmitter->agent,
+        self->priv->stream_id);
+    self->priv->created = FALSE;
+  }
 
   parent_class->dispose (object);
 }
-- 
1.5.6.5




More information about the farsight-commits mailing list