Hello,
if we have a SDP content like this one:
v=0
o=alice 2890844526 2890844527 IN IP4 host.example.com
s=
c=IN IP4 session.foo.org
t=0 0
m=audio 49170 RTP/AVP 97
c=IN IP4 stream.bar.org
a=rtpmap:97 iLBC/8000
m=audio 49170 RTP/AVP 97
a=rtpmap:97 iLBC/8000
m=audio 49170 RTP/AVP 97
c=IN IP4 bar.baz.net
a=rtpmap:97 iLBC/8000
When parsing this function three streams are created:
first one will have ip_addr string equal to "stream.bar.org"
second one: "stream.bar.org" <-- Wrong! it is using same as first one,
instead using session default
third one: "bar.baz.net"
Attached patch solves it.
Kind regards,
Vicente.
diff --git parser/sdp/sdp.c parser/sdp/sdp.c
index fb51f3f..134a676 100644
--- parser/sdp/sdp.c
+++ parser/sdp/sdp.c
@@ -449,6 +449,8 @@ static int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_
/* c2p will point to per-media "c=" */
c2p = find_sdp_line(m1p, m2p, 'c');
+ sdp_ip.s = NULL;
+ sdp_ip.len = 0;
if (c2p) {
/* Extract stream address */
tmpstr1.s = c2p;
_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev