From e1e9a157c015cbb3794d3db716854b292910a545 Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Wed, 12 Jan 2022 19:27:42 +0200 Subject: [PATCH] Fix `subscribe request` SDP media direction When building the SDP for a `subscribe request` command, take into consideration the media direction of the source stream - if stream is `recvonly`, then we do not have anything to send, thus the direction should be advertised as `inactive`, rather than `sendonly`. --- daemon/call.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index 69267e1ae..2d5273847 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2972,7 +2972,10 @@ static int monologue_subscribe_request1(struct call_monologue *src_ml, struct ca codec_handlers_update(dst_media, src_media, flags, sp); - MEDIA_SET(dst_media, SEND); + if (MEDIA_ISSET(src_media, SEND)) + MEDIA_SET(dst_media, SEND); + else + MEDIA_CLEAR(dst_media, SEND); MEDIA_CLEAR(dst_media, RECV); __rtcp_mux_set(flags, dst_media);