aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuigi Yucheng LIU <luigi.liu@laposte.net>2014-08-26 00:06:57 +0800
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-27 18:37:47 +0200
commit5646090398b786b11cce5e70276bdd16695eccd2 (patch)
tree5f2c441e3e1af1ea867bd8aa646e1f443a93155f /src
parent99633278c9f0fa91e2360cfc36b5ccf52c0e27dc (diff)
downloadfdk-aac-5646090398b786b11cce5e70276bdd16695eccd2.tar.gz
fdk-aac-5646090398b786b11cce5e70276bdd16695eccd2.tar.bz2
fdk-aac-5646090398b786b11cce5e70276bdd16695eccd2.zip
Update mot-encoder.cpp
Diffstat (limited to 'src')
-rw-r--r--src/mot-encoder.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index 9eb28b8..e2dae36 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -279,9 +279,9 @@ int main(int argc, char *argv[])
fprintf(stderr, "mot-encoder Error: cannot open directory '%s'\n", dir);
return 1;
}
- if (fidx == MAXSLIDEID) {
- fidx = 0;
- transmission_history.clear();
+
+ if (transmission_history.size() >= MAXSLIDEID) {
+ transmission_history.clear();
}
// Add new slides to transmit to list
@@ -303,7 +303,12 @@ int main(int argc, char *argv[])
// update transmission history
transmission_history[pDirent->d_name] = md.fidx;
- fidx++;
+
+ if (fidx == MAXSLIDEID) {
+ fidx = 0;
+ else {
+ fidx++;
+ }
}
slides_to_transmit.push_back(md);