summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mot-encoder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index ae0d556..c3c82b5 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -349,7 +349,7 @@ private:
void ResetPAD();
pad_t* FlushPAD();
public:
- std::vector<DATA_GROUP*> queue;
+ std::deque<DATA_GROUP*> queue;
PADPacketizer(size_t pad_size);
~PADPacketizer();
@@ -374,8 +374,8 @@ PADPacketizer::PADPacketizer(size_t pad_size) :
PADPacketizer::~PADPacketizer() {
while (!queue.empty()) {
- delete queue.back();
- queue.pop_back();
+ delete queue.front();
+ queue.pop_front();
}
}
@@ -393,7 +393,7 @@ pad_t* PADPacketizer::GetPAD() {
if (dg->Available() == 0) {
delete dg;
- queue.erase(queue.begin());
+ queue.pop_front();
}
}
@@ -529,7 +529,7 @@ pad_t* PADPacketizer::FlushPAD() {
pad_t* result = new pad_t(xpad_size_max + FPAD_LEN + 1);
pad_t &pad = *result;
- size_t pad_offset = pad.size() - 1 - FPAD_LEN;
+ size_t pad_offset = xpad_size_max;
if (subfields_size > 0) {
if (used_cis > 0) {