TT#14008 always add a=mid to media section

closes #1361

Change-Id: I8c3dfb54f47f0cfeb913f27b240eed55e2ca8154
pull/1373/head
Richard Fuchs 4 years ago
parent 0c7a1fdf28
commit a4e3f96b3f

@ -2574,13 +2574,13 @@ static struct packet_stream *print_sdp_media_section(GString *s, struct call_med
{
struct packet_stream *ps_rtcp = NULL;
if (is_active) {
if (media->media_id.s) {
g_string_append(s, "a=mid:");
g_string_append_printf(s, STR_FORMAT, STR_FMT(&media->media_id));
g_string_append(s, "\r\n");
}
if (media->media_id.s) {
g_string_append(s, "a=mid:");
g_string_append_printf(s, STR_FORMAT, STR_FMT(&media->media_id));
g_string_append(s, "\r\n");
}
if (is_active) {
if (proto_is_rtp(media->protocol))
insert_codec_parameters(s, media);

@ -40,6 +40,37 @@ my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp,
new_call;
offer('a=mid on zero streams', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0
c=IN IP4 198.51.100.14
a=sendrecv
a=mid:0
m=audio 0 RTP/AVP 0
c=IN IP4 198.51.100.14
a=sendrecv
a=mid:1
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=mid:0
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=mid:1
SDP
new_call;
my $ft1 = ft();

Loading…
Cancel
Save