aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2015-07-14 21:34:08 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-14 22:24:40 +0200
commitcef3e6facc28bd08c170d26240295abbc3658170 (patch)
tree7151a7e2b91f24ff64a0298f12634e6b388648c9
parentae63fc535c9d0dc1b62aa386adf2800241236049 (diff)
downloadfdk-aac-dabplus-cef3e6facc28bd08c170d26240295abbc3658170.tar.gz
fdk-aac-dabplus-cef3e6facc28bd08c170d26240295abbc3658170.tar.bz2
fdk-aac-dabplus-cef3e6facc28bd08c170d26240295abbc3658170.zip
MOT encoder: better queue type for PAD packetizer
-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) {