summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/edi/PFT.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-06 18:03:14 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-06 18:03:14 +0200
commitc714196bc8e2b3d4ecead22855096753b1b46e40 (patch)
tree7d5bcbdcd9d7780329c838e0e15da67824984827 /src/dabOutput/edi/PFT.cpp
parentc5d91bc88c264366d1e9062b23557d92e61b2298 (diff)
downloaddabmux-c714196bc8e2b3d4ecead22855096753b1b46e40.tar.gz
dabmux-c714196bc8e2b3d4ecead22855096753b1b46e40.tar.bz2
dabmux-c714196bc8e2b3d4ecead22855096753b1b46e40.zip
Fix several EDI bugs
Diffstat (limited to 'src/dabOutput/edi/PFT.cpp')
-rw-r--r--src/dabOutput/edi/PFT.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dabOutput/edi/PFT.cpp b/src/dabOutput/edi/PFT.cpp
index 0a6b431..ffefaeb 100644
--- a/src/dabOutput/edi/PFT.cpp
+++ b/src/dabOutput/edi/PFT.cpp
@@ -142,12 +142,10 @@ std::vector< PFTFragment > PFT::Assemble(AFPacket af_packet)
// calculate CRC over AF Header and payload
uint16_t crc = 0xffff;
- crc = crc16(crc, &(packet.back()), packet.size());
+ crc = crc16(crc, &(packet.front()), packet.size());
crc ^= 0xffff;
crc = htons(crc);
- packet.push_back((crc >> 24) & 0xFF);
- packet.push_back((crc >> 16) & 0xFF);
packet.push_back((crc >> 8) & 0xFF);
packet.push_back(crc & 0xFF);