From 2df7da85fee9693b35431fdda527b1e19ab14da4 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 6 Dec 2018 16:59:52 +1100 Subject: [PATCH] webrtc: add support for intersecting inactive transceiver directions --- ext/webrtc/webrtcsdp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/webrtc/webrtcsdp.c b/ext/webrtc/webrtcsdp.c index 715391ba22..cad0540b67 100644 --- a/ext/webrtc/webrtcsdp.c +++ b/ext/webrtc/webrtcsdp.c @@ -397,6 +397,8 @@ GstWebRTCRTPTransceiverDirection _intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer, GstWebRTCRTPTransceiverDirection answer) { + if (offer == DIR (INACTIVE) || answer == DIR (INACTIVE)) + return DIR (INACTIVE); if (offer == DIR (SENDONLY) && answer == DIR (SENDRECV)) return DIR (RECVONLY); if (offer == DIR (SENDONLY) && answer == DIR (RECVONLY)) @@ -411,6 +413,10 @@ _intersect_answer_directions (GstWebRTCRTPTransceiverDirection offer, return DIR (SENDONLY); if (offer == DIR (SENDRECV) && answer == DIR (RECVONLY)) return DIR (RECVONLY); + if (offer == DIR (RECVONLY) && answer == DIR (RECVONLY)) + return DIR (INACTIVE); + if (offer == DIR (SENDONLY) && answer == DIR (SENDONLY)) + return DIR (INACTIVE); return DIR (NONE); }