diff --git a/daemon/sdp.c b/daemon/sdp.c index 34343170c..106beee56 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -2640,12 +2640,13 @@ static void print_sdp_media_section(GString *s, struct call_media *media, /* add attributes and connection information only when audio is accepted */ if (!address || !address->port || !rtp_ps->selected_sfd) { + /* print zeroed address for the non accepted media, see RFC 3264 */ + sdp_out_add_media_connection(s, media, rtp_ps, NULL, flags); + /* just add the mid before finalizing (see #1361 and #1362). */ if (media->media_id.s) append_attr_to_gstring(s, "mid", &media->media_id, flags, media->type_id); - /* print zeroed address for the non accepted media, see RFC 3264 */ - sdp_out_add_media_connection(s, media, rtp_ps, NULL, flags); return; } diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index c911d1f13..19b02affa 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -298,8 +298,8 @@ a=content:main a=sendrecv a=rtcp:PORT m=application 0 RTP/AVP 0 -a=mid:5 c=IN IP4 0.0.0.0 +a=mid:5 SDP reverse_tags; @@ -596,8 +596,8 @@ a=sendrecv a=rtcp:PORT a=rtcp-mux m=application 0 RTP/AVP 0 -a=mid:5 c=IN IP4 0.0.0.0 +a=mid:5 SDP answer('a=mid mixup', { }, <