Don't set headers twice

This commit is contained in:
Lewis Moten
2024-05-17 15:16:52 -04:00
parent d9b5391601
commit 2be726346e

View File

@@ -219,11 +219,6 @@ export const pack = (bytes) => {
...dataLengthCrcBits,
...dataCrcBits,
];
// pad headers to take full bytes
while(headers.length % 8 !== 0) {
headers.push(0);
}
const unusedBitCount = getPacketizationHeaderUnusedBitCount();
headers.push(...new Array(unusedBitCount).fill(0));