Index: remoting/protocol/webrtc_transport.cc |
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc |
index c9c88c4e5a4716067ddbc4cc91bdbdc07e46c639..dcbbb8c8dddc17a2e692351712a24fc66bb97e75 100644 |
--- a/remoting/protocol/webrtc_transport.cc |
+++ b/remoting/protocol/webrtc_transport.cc |
@@ -472,6 +472,15 @@ void WebrtcTransport::OnLocalSessionDescriptionCreated( |
SdpMessage sdp_message(description_sdp); |
UpdateCodecParameters(&sdp_message, /*incoming=*/false); |
description_sdp = sdp_message.ToString(); |
+ webrtc::SdpParseError parse_error; |
+ description.reset(webrtc::CreateSessionDescription( |
+ description->type(), description_sdp, &parse_error)); |
+ if (!description) { |
+ LOG(ERROR) << "Failed to parse the session description: " |
+ << parse_error.description << " line: " << parse_error.line; |
+ Close(CHANNEL_CONNECTION_ERROR); |
+ return; |
+ } |
// Format and send the session description to the peer. |
std::unique_ptr<XmlElement> transport_info( |