[telepathy-gabble/master] Only get the media type from the description if it's unknown

Sjoerd Simons sjoerd.simons at collabora.co.uk
Thu Jun 25 09:59:40 PDT 2009


---
 src/jingle-media-rtp.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 06d0ac6..c3b7565 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -500,14 +500,17 @@ parse_description (GabbleJingleContent *content,
 {
   GabbleJingleMediaRtp *self = GABBLE_JINGLE_MEDIA_RTP (content);
   GabbleJingleMediaRtpPrivate *priv = self->priv;
-  JingleMediaType mtype = JINGLE_MEDIA_TYPE_NONE;
+  JingleMediaType mtype;
   GList *codecs = NULL;
   JingleCodec *p;
   LmMessageNode *node;
 
   DEBUG ("node: %s", desc_node->name);
 
-  mtype = extract_media_type (desc_node, error);
+  if (priv->media_type == JINGLE_MEDIA_TYPE_NONE)
+    mtype = extract_media_type (desc_node, error);
+  else
+    mtype = priv->media_type;
 
   if (mtype == JINGLE_MEDIA_TYPE_NONE)
     return;
-- 
1.5.6.5




More information about the telepathy-commits mailing list