diff --git a/daemon/sdp.c b/daemon/sdp.c index 2ed622ef0..30655f1cf 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -2382,15 +2382,15 @@ int sdp_replace(struct sdp_chopper *chop, GQueue *sessions, struct call_monologu copy_up_to_end_of(chop, &sdp_media->s); - if (!sdp_media->port_num || !ps->selected_sfd) - goto next; - if (call_media->media_id.s) { chopper_append_c(chop, "a=mid:"); chopper_append_str(chop, &call_media->media_id); chopper_append_c(chop, "\r\n"); } + if (!sdp_media->port_num || !ps->selected_sfd) + goto next; + if (proto_is_rtp(call_media->protocol)) insert_codec_parameters(chop, call_media); diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index aab70e769..438082e74 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -38,6 +38,37 @@ my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $resp, # DTLS early start with ICE (GH 1035 TT 84804) +new_call; + +offer('a=mid on zero streams', { ICE => 'remove' }, <