Browse code

b/f:core:SDP OA: accept only RTP/AVP transport, reject other m-lines with transport

Stefan Sayer authored on 25/02/2014 12:29:33
Showing 2 changed files
... ...
@@ -222,7 +222,7 @@ void AmArg::concat(const AmArg& a) {
222 222
   }
223 223
 }
224 224
 
225
-const size_t AmArg::size() const {
225
+size_t AmArg::size() const {
226 226
   if (Array == type)
227 227
     return v_array->size(); 
228 228
 
... ...
@@ -929,7 +929,8 @@ bool AmSession::getSdpAnswer(const AmSdp& offer, AmSdp& answer)
929 929
     answer.media.push_back(SdpMedia());
930 930
     SdpMedia& answer_media = answer.media.back();
931 931
 
932
-    if( m_it->type == MT_AUDIO 
932
+    if( m_it->type == MT_AUDIO
933
+	&& m_it->transport == TP_RTPAVP
933 934
         && audio_1st_stream 
934 935
         && (m_it->port != 0) ) {
935 936
 
... ...
@@ -949,7 +950,7 @@ bool AmSession::getSdpAnswer(const AmSdp& offer, AmSdp& answer)
949 950
       answer_media.type = m_it->type;
950 951
       answer_media.port = 0;
951 952
       answer_media.nports = 0;
952
-      answer_media.transport = TP_RTPAVP;
953
+      answer_media.transport = m_it->transport;
953 954
       answer_media.send = false;
954 955
       answer_media.recv = false;
955 956
       answer_media.payloads.clear();