Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit f1bf686

Browse files
authored
Ignore rejected sections to avoid malformatted SDP. (#716)
m=section could be rejected because of no match codecs. In this case, munging SDP here may result media format description to be empty.
1 parent 9ec5c2f commit f1bf686

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

talk/owt/sdk/base/sdputils.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ std::string SdpUtils::SetPreferCodecs(const std::string& sdp,
256256
RTC_LOG(LS_WARNING) << "Wrong SDP format description: " << m_line;
257257
return sdp;
258258
}
259+
if (m_line_vector[1] == "0") {
260+
RTC_LOG(LS_WARNING) << "Ignore rejected section: " << m_line;
261+
return sdp;
262+
}
259263
std::stringstream m_line_stream;
260264
for (int i = 0; i < 3; i++) {
261265
if (i < 2)

0 commit comments

Comments
 (0)