完善twcc相关逻辑
This commit is contained in:
parent
6c951c8ca9
commit
1d84bb5458
|
|
@ -423,22 +423,26 @@ map<uint16_t, std::pair<SymbolStatus, uint32_t/*stamp*/> > FCI_TWCC::getPacketCh
|
||||||
auto end = (uint8_t *) this + total_size;
|
auto end = (uint8_t *) this + total_size;
|
||||||
CHECK(ptr < end);
|
CHECK(ptr < end);
|
||||||
auto seq = getBaseSeq();
|
auto seq = getBaseSeq();
|
||||||
|
auto rtp_count = getPacketCount();
|
||||||
for (uint8_t i = 0; i < getPacketCount();) {
|
for (uint8_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) {
|
||||||
//RunLengthChunk
|
//RunLengthChunk
|
||||||
for (auto j = 0; j < chunk->getRunLength(); ++j) {
|
for (auto j = 0; j < chunk->getRunLength(); ++j) {
|
||||||
ret.emplace(seq++, std::make_pair((SymbolStatus) chunk->symbol, 0));
|
ret.emplace(seq++, std::make_pair((SymbolStatus) chunk->symbol, 0));
|
||||||
++i;
|
if (++i >= rtp_count) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//StatusVecChunk
|
//StatusVecChunk
|
||||||
StatusVecChunk *chunk = (StatusVecChunk *) ptr;
|
StatusVecChunk *chunk = (StatusVecChunk *) ptr;
|
||||||
for (auto &symbol : chunk->getSymbolList()) {
|
for (auto &symbol : chunk->getSymbolList()) {
|
||||||
ret.emplace(seq++, std::make_pair(symbol, 0));
|
ret.emplace(seq++, std::make_pair(symbol, 0));
|
||||||
++i;
|
if (++i >= rtp_count) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue