From 8771aabb9ca525042d66699e1890183ac94de2e5 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 27 Jul 2015 19:55:51 +0200 Subject: TAGPacket: remove packet_length --- src/dabOutput/edi/TagPacket.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/dabOutput/edi') 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 #include #include +#include std::vector TagPacket::Assemble() @@ -41,21 +42,17 @@ std::vector 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 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; -- cgit v1.2.3