Index: webrtc/api/webrtcsdp_unittest.cc |
diff --git a/webrtc/api/webrtcsdp_unittest.cc b/webrtc/api/webrtcsdp_unittest.cc |
index 5c69d50c984815a33b537eb19188eb33d2931cac..c1cc2756838da00f34e87c5cae0c3417d468b34f 100644 |
--- a/webrtc/api/webrtcsdp_unittest.cc |
+++ b/webrtc/api/webrtcsdp_unittest.cc |
@@ -2915,6 +2915,41 @@ TEST_F(WebRtcSdpTest, DeserializeVideoFmtp) { |
EXPECT_EQ(found->second, "40"); |
} |
+TEST_F(WebRtcSdpTest, DeserializeVideoFmtpWithSprops) { |
+ JsepSessionDescription jdesc_output(kDummyString); |
+ |
+ const char kSdpWithFmtpString[] = |
+ "v=0\r\n" |
+ "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" |
+ "s=-\r\n" |
+ "t=0 0\r\n" |
+ "m=video 49170 RTP/AVP 98\r\n" |
+ "a=rtpmap:98 H264/90000\r\n" |
+ "a=fmtp:98 profile-level-id=42A01E; " |
+ "sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==\r\n"; |
+ |
+ // Deserialize |
sprang_webrtc
2016/05/30 15:43:29
End comments with a period. Though I don't think y
johan
2016/05/30 15:57:06
Done.
|
+ SdpParseError error; |
+ EXPECT_TRUE( |
+ webrtc::SdpDeserialize(kSdpWithFmtpString, &jdesc_output, &error)); |
+ |
+ const ContentInfo* vc = GetFirstVideoContent(jdesc_output.description()); |
+ ASSERT_TRUE(vc != NULL); |
sprang_webrtc
2016/05/30 15:43:29
nullptr
johan
2016/05/30 15:57:06
Done.
|
+ const VideoContentDescription* vcd = |
+ static_cast<const VideoContentDescription*>(vc->description); |
+ ASSERT_FALSE(vcd->codecs().empty()); |
+ cricket::VideoCodec h264 = vcd->codecs()[0]; |
+ EXPECT_EQ("H264", h264.name); |
+ EXPECT_EQ(98, h264.id); |
+ cricket::CodecParameterMap::const_iterator found = |
+ h264.params.find("profile-level-id"); |
+ ASSERT_TRUE(found != h264.params.end()); |
+ EXPECT_EQ(found->second, "42A01E"); |
+ found = h264.params.find("sprop-parameter-sets"); |
+ ASSERT_TRUE(found != h264.params.end()); |
+ EXPECT_EQ(found->second, "Z0IACpZTBYmI,aMljiA=="); |
+} |
+ |
TEST_F(WebRtcSdpTest, DeserializeVideoFmtpWithSpace) { |
JsepSessionDescription jdesc_output(kDummyString); |