diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-07-27 19:55:51 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-07-27 19:55:51 +0200 |
commit | 8771aabb9ca525042d66699e1890183ac94de2e5 (patch) | |
tree | d420462806198d44cadf2a6faba6223026ca303e /src | |
parent | 394749e7f77286d1892f624e00f412296aaf1782 (diff) | |
download | dabmux-8771aabb9ca525042d66699e1890183ac94de2e5.tar.gz dabmux-8771aabb9ca525042d66699e1890183ac94de2e5.tar.bz2 dabmux-8771aabb9ca525042d66699e1890183ac94de2e5.zip |
TAGPacket: remove packet_length
Diffstat (limited to 'src')
-rw-r--r-- | src/dabOutput/edi/TagPacket.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/dabOutput/edi/TagPacket.cpp b/src/dabOutput/edi/TagPacket.cpp index fbb0f8b..aa4f23b 100644 --- a/src/dabOutput/edi/TagPacket.cpp +++ b/src/dabOutput/edi/TagPacket.cpp @@ -31,6 +31,7 @@ #include <string> #include <list> #include <stdint.h> +#include <cassert> std::vector<uint8_t> TagPacket::Assemble() @@ -41,21 +42,17 @@ std::vector<uint8_t> TagPacket::Assemble() //std::cerr << "Assemble TAGPacket" << std::endl; - size_t packet_length = 0; for (tag = tag_items.begin(); tag != tag_items.end(); ++tag) { std::vector<uint8_t> tag_data = (*tag)->Assemble(); packet.insert(packet.end(), tag_data.begin(), tag_data.end()); - packet_length += tag_data.size(); - //std::cerr << " Add TAGItem of length " << tag_data.size() << std::endl; } // Add padding - while (packet_length % 8 > 0) + while (packet.size() % 8 > 0) { packet.push_back(0); // TS 102 821, 5.1, "padding shall be undefined" - packet_length++; } return packet; |