[farsight2/master] Stop and dispose of the send codec bin

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


---
 gst/fsrtpconference/fs-rtp-session.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 7210690..f0f7085 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -346,7 +346,8 @@ fs_rtp_session_dispose (GObject *object)
     gst_element_set_state (self->priv->rtpmuxer, GST_STATE_NULL);
   if (self->priv->send_capsfilter)
     gst_element_set_state (self->priv->send_capsfilter, GST_STATE_NULL);
-  /* TODO: Stop the codec bin */
+  if (self->priv->send_codecbin)
+    gst_element_set_state (self->priv->send_codecbin, GST_STATE_NULL);
   if (self->priv->media_sink_valve)
     gst_element_set_state (self->priv->media_sink_valve, GST_STATE_NULL);
   if (self->priv->media_sink_pad)
@@ -383,6 +384,14 @@ fs_rtp_session_dispose (GObject *object)
     self->priv->rtpmuxer = NULL;
   }
 
+  if (self->priv->send_codecbin) {
+    gst_bin_remove (GST_BIN (self->priv->conference),
+      self->priv->send_codecbin);
+    gst_element_set_state (self->priv->send_codecbin, GST_STATE_NULL);
+    gst_object_unref (self->priv->send_codecbin);
+    self->priv->send_codecbin = NULL;
+  }
+
   if (self->priv->send_capsfilter) {
     gst_bin_remove (GST_BIN (self->priv->conference),
       self->priv->send_capsfilter);
-- 
1.5.6.5




More information about the farsight-commits mailing list