diff --git a/daemon/sdp.c b/daemon/sdp.c index 95aeb4e41..76222e383 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3263,7 +3263,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 ba0ca8b49..26162b0ca 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=', { }, <