[farsight2/master] Remove now unused local_codecs variable

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


---
 gst/fsrtpconference/fs-rtp-codec-negotiation.c |   13 +------------
 gst/fsrtpconference/fs-rtp-codec-negotiation.h |    3 +--
 gst/fsrtpconference/fs-rtp-session.c           |   15 +++------------
 3 files changed, 5 insertions(+), 26 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index cd17a94..21dbf9f 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -253,17 +253,13 @@ GList *
 create_local_codec_associations (
     GList *blueprints,
     GList *codec_prefs,
-    GList *current_codec_associations,
-    GList **local_codecs_list)
+    GList *current_codec_associations)
 {
   GList *codec_associations = NULL;
   GList *bp_e = NULL;
-  GList *local_codecs = NULL;
   GList *codec_pref_e = NULL;
   GList *lca_e = NULL;
 
-  *local_codecs_list = NULL;
-
   if (blueprints == NULL)
     return NULL;
 
@@ -412,15 +408,8 @@ create_local_codec_associations (
     }
 
     codec_associations = g_list_append (codec_associations, ca);
-    local_codecs = g_list_append (local_codecs, fs_codec_copy (ca->codec));
   }
 
-  *local_codecs_list = local_codecs;
-
-  /* If no local codecs where detected */
-  if (!local_codecs)
-    goto error;
-
   return codec_associations;
 
  error:
diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.h b/gst/fsrtpconference/fs-rtp-codec-negotiation.h
index 5ef0ce3..7bff6c5 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.h
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.h
@@ -54,8 +54,7 @@ GList *
 create_local_codec_associations (
     GList *blueprints,
     GList *codec_prefs,
-    GList *current_codec_associations,
-    GList **local_codecs_list);
+    GList *current_codec_associations);
 
 GHashTable *
 negotiate_codecs (const GList *remote_codecs,
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index 890e7e4..ae55659 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -130,7 +130,6 @@ struct _FsRtpSessionPrivate
 
   GList *local_codecs_configuration;
 
-  GList *local_codecs;
   GList *local_codec_associations;
 
   /* These are protected by the session mutex */
@@ -497,9 +496,6 @@ fs_rtp_session_finalize (GObject *object)
   if (self->priv->local_codecs_configuration)
     fs_codec_list_destroy (self->priv->local_codecs_configuration);
 
-  if (self->priv->local_codecs)
-    fs_codec_list_destroy (self->priv->local_codecs);
-
   if (self->priv->local_codec_associations)
     codec_association_list_destroy (self->priv->local_codec_associations);
 
@@ -650,8 +646,7 @@ fs_rtp_session_constructed (GObject *object)
   self->priv->local_codec_associations = create_local_codec_associations (
       self->priv->blueprints,
       NULL, /* there are no local codec configurations yet */
-      NULL,
-      &self->priv->local_codecs);
+      NULL);
 
   if (!self->priv->local_codec_associations) {
     self->priv->construction_error = g_error_new (FS_ERROR,
@@ -1243,7 +1238,6 @@ fs_rtp_session_set_local_codecs_config (FsSession *session,
     GError **error)
 {
   FsRtpSession *self = FS_RTP_SESSION (session);
-  GList *new_local_codecs = NULL;
   GList  *new_local_codec_associations = NULL;
   GList *new_local_codecs_configuration =
     fs_codec_list_copy (local_codecs_config);
@@ -1259,15 +1253,12 @@ fs_rtp_session_set_local_codecs_config (FsSession *session,
 
   new_local_codec_associations = create_local_codec_associations (
       self->priv->blueprints, new_local_codecs_configuration,
-      self->priv->local_codec_associations,
-      &new_local_codecs);
+      self->priv->local_codec_associations);
 
-  if (new_local_codecs && new_local_codec_associations)
+  if (new_local_codec_associations)
   {
-    fs_codec_list_destroy (self->priv->local_codecs);
     codec_association_list_destroy (self->priv->local_codec_associations);
     self->priv->local_codec_associations = new_local_codec_associations;
-    self->priv->local_codecs = new_local_codecs;
 
     fs_codec_list_destroy (self->priv->local_codecs_configuration);
     self->priv->local_codecs_configuration =
-- 
1.5.6.5




More information about the farsight-commits mailing list