diff --git a/daemon/sdp.c b/daemon/sdp.c index 78d5312bd..c3b0b947a 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3335,7 +3335,9 @@ int sdp_replace(struct sdp_chopper *chop, sdp_sessions_q *sessions, if (!call_media->streams.head) continue; ps = call_media->streams.head->data; - break; + if (ps->selected_sfd) + break; + ps = NULL; } err = "no usable session media stream"; diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index df0d58b6d..b73830252 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -82,6 +82,112 @@ sub stun_succ { +new_call; + +offer('reject first stream, session c=', { }, <