diff options
author | Nick Piggott <nick@piggott.eu> | 2017-06-11 00:10:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 00:10:13 +0100 |
commit | e6cda019bc6e0d97bb40e4369f29156f49089765 (patch) | |
tree | 3952f591465b6577f6e6caf81416354aa32c08df /src | |
parent | 7378fc903a26f779c48114e6305a89e59a3285d6 (diff) | |
download | dabmux-e6cda019bc6e0d97bb40e4369f29156f49089765.tar.gz dabmux-e6cda019bc6e0d97bb40e4369f29156f49089765.tar.bz2 dabmux-e6cda019bc6e0d97bb40e4369f29156f49089765.zip |
Correct insertion of long form SID in FIG0/8
Only the bottom 16 bits of long form SIDs (32 bit) were not being correctly written into FIG0/8. This amendment corrects that to write all 32bits.
Diffstat (limited to 'src')
-rw-r--r-- | src/fig/FIG0_8.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fig/FIG0_8.cpp b/src/fig/FIG0_8.cpp index 8d69a1d..0144b4f 100644 --- a/src/fig/FIG0_8.cpp +++ b/src/fig/FIG0_8.cpp @@ -177,8 +177,10 @@ FillStatus FIG0_8::fill(uint8_t *buf, size_t max_size) } if ((*subchannel)->type == subchannel_type_t::Packet) { // Data packet - buf[0] = ((*componentFIG0_8)->serviceId >> 8) & 0xFF; - buf[1] = ((*componentFIG0_8)->serviceId) & 0xFF; + buf[0] = ((*componentFIG0_8)->serviceId >> 24) & 0xFF; + buf[1] = ((*componentFIG0_8)->serviceId >> 16) & 0xFF; + buf[2] = ((*componentFIG0_8)->serviceId >> 8) & 0xFF; + buf[3] = ((*componentFIG0_8)->serviceId) & 0xFF; fig0->Length += 4; buf += 4; remaining -= 4; @@ -194,8 +196,10 @@ FillStatus FIG0_8::fill(uint8_t *buf, size_t max_size) remaining -= 3; } else { // Audio, data stream or FIDC - buf[0] = ((*componentFIG0_8)->serviceId >> 8) & 0xFF; - buf[1] = ((*componentFIG0_8)->serviceId) & 0xFF; + buf[0] = ((*componentFIG0_8)->serviceId >> 24) & 0xFF; + buf[1] = ((*componentFIG0_8)->serviceId >> 16) & 0xFF; + buf[2] = ((*componentFIG0_8)->serviceId >> 8) & 0xFF; + buf[3] = ((*componentFIG0_8)->serviceId) & 0xFF; fig0->Length += 4; buf += 4; remaining -= 4; |