[farsight2/master] Don't change the PT if we're re-using an already existing codecassociation

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


---
 gst/fsrtpconference/fs-rtp-codec-negotiation.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index 53090fb..49180e8 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -429,13 +429,20 @@ create_local_codec_associations (
        lca_e = g_list_next (lca_e))
   {
     CodecAssociation *lca = lca_e->data;
+    CodecAssociation *tmpca = NULL;
 
     if (lca->reserved)
       continue;
 
-    if (lookup_codec_association_by_pt_list (current_codec_associations,
-            lca->codec->id, TRUE) ||
-        lca->codec->id < 0)
+    tmpca = lookup_codec_association_by_pt_list (current_codec_associations,
+        lca->codec->id, TRUE);
+
+    /* Same blueprint, we've copied the ID voluntarily, continue */
+    if (tmpca->blueprint == lca->blueprint)
+      continue;
+
+    /* If we have a different blueprint or a ANY id, we have to get a new id */
+    if (tmpca || lca->codec->id < 0)
     {
       lca->codec->id = _find_first_empty_dynamic_entry (
           current_codec_associations, codec_associations);
-- 
1.5.6.5




More information about the farsight-commits mailing list