[farsight2/master] Get a copy of the local-codecs-config list

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


---
 gst/fsrtpconference/fs-rtp-codec-negotiation.c |    5 +++--
 gst/fsrtpconference/fs-rtp-session.c           |    9 +++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index ee0c7fd..985e6b3 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -38,9 +38,10 @@
  *
  * This function validates a GList of passed FarsightCodec structures
  * against the valid discovered payloaders
- * It removes all "invalid" codecs from the list
+ * It removes all "invalid" codecs from the list, it modifies the list
+ * passed in as an argument.
  *
- * Returns: a #GList of #FsCodec minus the invalid ones
+ * Returns: the #GList of #FsCodec minus the invalid ones
  */
 GList *
 validate_codecs_configuration (FsMediaType media_type, GList *blueprints,
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index fc7a7c8..23eebd4 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -530,8 +530,8 @@ fs_rtp_session_set_property (GObject *object,
       self->id = g_value_get_uint (value);
       break;
     case PROP_LOCAL_CODECS_CONFIG:
-      if (self->priv->local_codecs) {
-        GList *new_local_codecs_configuration = g_value_get_boxed (value);
+      {
+        GList *new_local_codecs_configuration = g_value_dup_boxed (value);
         GList *new_local_codecs = NULL;
         GHashTable  *new_local_codec_associations = NULL;
 
@@ -559,11 +559,8 @@ fs_rtp_session_set_property (GObject *object,
 
         } else {
           GST_WARNING ("Invalid new codec configurations");
+          fs_codec_list_destroy(new_local_codecs_configuration);
         }
-      } else {
-        if (self->priv->local_codecs_configuration)
-          fs_codec_list_destroy (self->priv->local_codecs_configuration);
-        self->priv->local_codecs_configuration = g_value_get_boxed (value);
       }
       break;
     case PROP_CONFERENCE:
-- 
1.5.6.5




More information about the farsight-commits mailing list