mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复nack fci相关bug
This commit is contained in:
parent
5c52c636a3
commit
55fc598d4c
@ -155,13 +155,14 @@ string FCI_REMB::dumpString() const {
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
FCI_NACK::FCI_NACK(uint16_t pid_h, const vector<bool> &type) {
|
||||
assert(type.size() <= kBitSize);
|
||||
uint16_t blp_h = 0;
|
||||
int i = kBitSize;
|
||||
int i = 0;
|
||||
for (auto item : type) {
|
||||
--i;
|
||||
if (item) {
|
||||
blp_h |= (1 << i);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
blp = htons(blp_h);
|
||||
pid = htons(pid_h);
|
||||
@ -187,7 +188,7 @@ vector<bool> FCI_NACK::getBitArray() const {
|
||||
|
||||
auto blp_h = getBlp();
|
||||
for (size_t i = 0; i < kBitSize; ++i) {
|
||||
ret[i + 1] = blp_h & (1 << (kBitSize - i - 1));
|
||||
ret[i + 1] = blp_h & (1 << i);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user