[farsight2/master] Simplify the set_send_codec code a little

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


---
 gst/fsrtpconference/fs-rtp-session.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index f0f7085..50455d4 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -1063,13 +1063,14 @@ fs_rtp_session_set_send_codec (FsSession *session, FsCodec *send_codec,
       fs_codec_destroy (self->priv->requested_send_codec);
 
     self->priv->requested_send_codec = fs_codec_copy (send_codec);
-  }
 
-  if (elem)
     ret = fs_rtp_session_verify_send_codec_bin_locked (self, error);
+  }
   else
+  {
     g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
         "The passed codec is not part of the list of negotiated codecs");
+  }
 
   FS_RTP_SESSION_UNLOCK (self);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list