[farsight2/master] Set the discovery capsfilter when the codecbin is set

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


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

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 45e9c78..8039ff4 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -3390,7 +3390,6 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
   if (session->priv->discovery_fakesink == NULL &&
       session->priv->discovery_capsfilter == NULL)
   {
-    GstCaps *caps;
 
     tmp = g_strdup_printf ("discovery_fakesink_%d", session->id);
     session->priv->discovery_fakesink =
@@ -3433,12 +3432,6 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
       goto error;
     }
 
-    caps = fs_codec_to_gst_caps (ca->codec);
-    g_object_set (session->priv->discovery_capsfilter,
-        "caps", caps,
-        NULL);
-    gst_caps_unref (caps);
-
     if (!gst_bin_add (GST_BIN (session->priv->conference),
             session->priv->discovery_capsfilter))
     {
@@ -3493,6 +3486,13 @@ fs_rtp_session_get_codec_params (FsRtpSession *session, CodecAssociation *ca,
     goto error;
   }
 
+  caps = fs_codec_to_gst_caps (ca->codec);
+  g_object_set (session->priv->discovery_capsfilter,
+      "caps", caps,
+      NULL);
+  gst_caps_unref (caps);
+
+
   if (!gst_element_link_pads (session->priv->discovery_codecbin, "src",
             session->priv->discovery_capsfilter, "sink"))
   {
-- 
1.5.6.5




More information about the farsight-commits mailing list