Merge branch 'master' into multi-block-fec

This commit is contained in:
loki 2021-07-10 17:37:47 +02:00
commit fccb8d080d
8 changed files with 43 additions and 13 deletions

View file

@ -512,11 +512,14 @@ std::vector<uint8_t> replace(const std::string_view &original, const std::string
std::vector<uint8_t> replaced;
auto begin = std::begin(original);
auto next = std::search(begin, std::end(original), std::begin(old), std::end(old));
auto end = std::end(original);
auto next = std::search(begin, end, std::begin(old), std::end(old));
std::copy(begin, next, std::back_inserter(replaced));
std::copy(std::begin(_new), std::end(_new), std::back_inserter(replaced));
std::copy(next + old.size(), std::end(original), std::back_inserter(replaced));
if(next != end) {
std::copy(std::begin(_new), std::end(_new), std::back_inserter(replaced));
std::copy(next + old.size(), end, std::back_inserter(replaced));
}
return replaced;
}
@ -928,7 +931,7 @@ void videoBroadcastThread(udp::socket &sock) {
inspect->packet.flags |= FLAG_EOF;
}
inspect->rtp.header = FLAG_EXTENSION;
inspect->rtp.header = 0x80 | FLAG_EXTENSION;
inspect->rtp.sequenceNumber = util::endian::big<uint16_t>(lowseq + x);
}