Merge branch 'ZLMediaKit:master' into master
This commit is contained in:
commit
c42a11b2b4
|
|
@ -432,7 +432,7 @@ FCI_TWCC::TwccPacketStatus FCI_TWCC::getPacketChunkList(size_t total_size) const
|
||||||
CHECK(ptr < end);
|
CHECK(ptr < end);
|
||||||
auto seq = getBaseSeq();
|
auto seq = getBaseSeq();
|
||||||
auto rtp_count = getPacketCount();
|
auto rtp_count = getPacketCount();
|
||||||
for (uint8_t i = 0; i < rtp_count;) {
|
for (uint16_t i = 0; i < rtp_count;) {
|
||||||
CHECK(ptr + RunLengthChunk::kSize <= end);
|
CHECK(ptr + RunLengthChunk::kSize <= end);
|
||||||
RunLengthChunk *chunk = (RunLengthChunk *)ptr;
|
RunLengthChunk *chunk = (RunLengthChunk *)ptr;
|
||||||
if (!chunk->type) {
|
if (!chunk->type) {
|
||||||
|
|
|
||||||
|
|
@ -267,16 +267,23 @@ void RtcSessionSdp::parse(const string &str) {
|
||||||
static auto flag = registerAllItem();
|
static auto flag = registerAllItem();
|
||||||
RtcSdpBase *media = nullptr;
|
RtcSdpBase *media = nullptr;
|
||||||
auto lines = split(str, "\n");
|
auto lines = split(str, "\n");
|
||||||
|
std::set<std::string> line_set;
|
||||||
for (auto &line : lines) {
|
for (auto &line : lines) {
|
||||||
trim(line);
|
trim(line);
|
||||||
if (line.size() < 3 || line[1] != '=') {
|
if (line.size() < 3 || line[1] != '=') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!line_set.emplace(line).second) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto key = line.substr(0, 1);
|
auto key = line.substr(0, 1);
|
||||||
auto value = line.substr(2);
|
auto value = line.substr(2);
|
||||||
if (!strcasecmp(key.data(), "m")) {
|
if (!strcasecmp(key.data(), "m")) {
|
||||||
medias.emplace_back(RtcSdpBase());
|
medias.emplace_back(RtcSdpBase());
|
||||||
media = &medias.back();
|
media = &medias.back();
|
||||||
|
line_set.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
SdpItem::Ptr item;
|
SdpItem::Ptr item;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue