Bug 1653720 - Do not generate kFid ssrc-group if no msid is present; r=bwc

Chrome's SDP parser has problems with an ssrc-group being present if the media
section is inactive and does not have an msid.

Differential Revision: https://phabricator.services.mozilla.com/D85320
This commit is contained in:
Dan Minor 2020-08-04 14:45:12 +00:00
Родитель 4f1cccc879
Коммит b9cc2eb001
2 изменённых файлов: 30 добавлений и 2 удалений

Просмотреть файл

@ -6919,4 +6919,33 @@ TEST_F(JsepSessionTest, TestOneWayRtx) {
}
}
TEST_F(JsepSessionTest, TestOfferRtxNoMsid) {
for (auto& codec : mSessionOff->Codecs()) {
if (codec->mName == "VP8") {
JsepVideoCodecDescription* vp8 =
static_cast<JsepVideoCodecDescription*>(codec.get());
vp8->EnableRtx("42");
break;
}
}
types.push_back(SdpMediaSection::kVideo);
AddTracks(*mSessionOff, "video");
std::vector<std::string> streamIds;
for (const auto& [id, transceiver] : mSessionOff->GetTransceivers()) {
(void)id; // Lame, but no better way to do this right now.
if (!IsNull(transceiver->mSendTrack)) {
transceiver->mSendTrack.UpdateStreamIds(streamIds);
}
}
// If no MSID is present, we should not have a FID ssrc-group
JsepOfferOptions options;
std::string offer;
JsepSession::Result result = mSessionOff->CreateOffer(options, &offer);
ASSERT_FALSE(result.mError.isSome());
ASSERT_EQ(std::string::npos, offer.find("FID")) << offer;
}
} // namespace mozilla

Просмотреть файл

@ -284,8 +284,7 @@ void JsepTrack::AddToMsection(const std::vector<JsConstraints>& constraintsList,
}
bool requireRtxSsrcs =
rtxEnabled && msection->GetDirectionAttribute().mValue !=
SdpDirectionAttribute::Direction::kRecvonly;
rtxEnabled && msection->IsSending() && !mStreamIds.empty();
if (mType != SdpMediaSection::kApplication && mDirection == sdp::kSend) {
UpdateSsrcs(ssrcGenerator, constraintsList.size());