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

This commit is contained in:
Byron Campen [:bwc] 2015-05-13 11:54:06 -07:00
parent c4edddd50b
commit c6f631ba3f

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;