Add data alignment declaration

This commit is contained in:
xiongziliang 2023-12-31 22:15:51 +08:00
parent f382f1fa95
commit 519cce8c29
2 changed files with 6 additions and 3 deletions

View File

@ -210,7 +210,7 @@ string FCI_NACK::dumpString() const {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma pack(push, 1)
class RunLengthChunk {
public:
static size_t constexpr kSize = 2;
@ -241,6 +241,7 @@ public:
// 打印本对象
string dumpString() const;
};
#pragma pack(pop)
RunLengthChunk::RunLengthChunk(SymbolStatus status, uint16_t run_length) {
type = 0;
@ -261,7 +262,7 @@ string RunLengthChunk::dumpString() const {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma pack(push, 1)
class StatusVecChunk {
public:
static size_t constexpr kSize = 2;
@ -292,6 +293,7 @@ public:
// 打印本对象
string dumpString() const;
};
#pragma pack(pop)
StatusVecChunk::StatusVecChunk(bool symbol_bit, const vector<SymbolStatus> &status) {
CHECK(status.size() << symbol_bit <= 14);

View File

@ -14,6 +14,7 @@
#include "Rtcp.h"
namespace mediakit {
#pragma pack(push, 1)
/////////////////////////////////////////// PSFB ////////////////////////////////////////////////////
@ -375,6 +376,6 @@ private:
// feedback packet count,反馈包号,本包是第几个transport-cc包每次加1 |
uint8_t fb_pkt_count;
};
#pragma pack(pop)
} // namespace mediakit
#endif // ZLMEDIAKIT_RTCPFCI_H