Bug 1164582 - Report an error when the appdata portion of a webrtc msid is missing. r=mt

--HG--
extra : transplant_source : %85%F8H%F3%C1N6%BD%9E%BC%D3o%27%A3Z%FE%8A%1BL%17
This commit is contained in:
Byron Campen [:bwc] 2015-05-13 11:54:06 -07:00
parent 61d50cc4ae
commit 643ed33a07

View File

@ -610,6 +610,11 @@ JsepSessionImpl::GetIdsFromMsid(const Sdp& sdp,
for (auto i = allMsids.begin(); i != allMsids.end(); ++i) {
if (allMsidsAreWebrtc || webrtcMsids.count(i->identifier)) {
if (i->appdata.empty()) {
JSEP_SET_ERROR("Invalid webrtc msid at level " << msection.GetLevel()
<< ": Missing track id.");
return NS_ERROR_INVALID_ARG;
}
if (!found) {
*streamId = i->identifier;
*trackId = i->appdata;