[farsight2/master] Don't drop configuration on re-negotiation

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


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

diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index 3334337..a2740c2 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -368,6 +368,19 @@ create_local_codec_associations (
         FsCodec *codec = sdp_is_compat (codec_pref, oldca->codec);
         if (codec)
         {
+          GList *item = NULL;
+
+          /* Keep the local configuration */
+          for (item = oldca->codec->optional_params;
+               item;
+               item = g_list_next (item))
+          {
+            FsCodecParameter *param = item->data;
+            if (codec_has_config_data_named (codec, param->name))
+              fs_codec_add_optional_parameter (codec, param->name,
+                  param->value);
+          }
+
           ca = g_slice_new (CodecAssociation);
           memcpy (ca, oldca, sizeof (CodecAssociation));
           ca->codec = codec;
-- 
1.5.6.5




More information about the farsight-commits mailing list