aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-06-16 13:22:48 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-06-16 13:22:48 +0200
commit02bdb2a0eedbb3ffd4870df0c0e69fd5dbcec856 (patch)
treedc3b3d2a945f59ec637fe32d2e45642faf039c36
parentb3bc56c30ee55d8ad32ae6f86de51c21336f1151 (diff)
parente6cda019bc6e0d97bb40e4369f29156f49089765 (diff)
downloaddabmux-02bdb2a0eedbb3ffd4870df0c0e69fd5dbcec856.tar.gz
dabmux-02bdb2a0eedbb3ffd4870df0c0e69fd5dbcec856.tar.bz2
dabmux-02bdb2a0eedbb3ffd4870df0c0e69fd5dbcec856.zip
Merge FIG0/8 fix from pull request 24
-rw-r--r--src/fig/FIG0_8.cpp12
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;