[farsight2/master] Add the discovered parameters in optional parameters

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


---
 gst/fsrtpconference/fs-rtp-session.c |   10 +++++-----
 tests/check/main/rtpcodecs.c         |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 13eb610..37bf7ca 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -2999,7 +2999,8 @@ _discovery_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session)
         {
           GList *item = NULL;
 
-          for (item = ca->codec->config_params; item; item = g_list_next (item))
+          for (item = ca->codec->optional_params; item;
+               item = g_list_next (item))
           {
             FsCodecParameter *param = item->data;
             if (!g_ascii_strcasecmp (param->name, name))
@@ -3008,16 +3009,15 @@ _discovery_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session)
                 break;
 
               /* replace the value if its different */
-              ca->codec->config_params =
-                g_list_delete_link (ca->codec->config_params, item);
-              fs_codec_add_config_parameter (ca->codec, name, value);
+              fs_codec_remove_optional_parameter (ca->codec, param);
+              fs_codec_add_optional_parameter (ca->codec, name, value);
               break;
             }
           }
 
           /* Add it if it wasn't there */
           if (item == NULL)
-            fs_codec_add_config_parameter (ca->codec, name, value);
+            fs_codec_add_optional_parameter (ca->codec, name, value);
         }
       }
     }
diff --git a/tests/check/main/rtpcodecs.c b/tests/check/main/rtpcodecs.c
index b9e4d0c..394a497 100644
--- a/tests/check/main/rtpcodecs.c
+++ b/tests/check/main/rtpcodecs.c
@@ -424,7 +424,7 @@ _bus_message_element (GstBus *bus, GstMessage *message,
 
   fail_if (item == NULL, "Could not find Vorbis in local codecs");
 
-  for (item = codec->config_params; item; item = g_list_next (item))
+  for (item = codec->optional_params; item; item = g_list_next (item))
   {
     FsCodecParameter *param = item->data;
 
-- 
1.5.6.5




More information about the farsight-commits mailing list