From 99633278c9f0fa91e2360cfc36b5ccf52c0e27dc Mon Sep 17 00:00:00 2001 From: Luigi Yucheng LIU Date: Mon, 25 Aug 2014 23:33:34 +0800 Subject: Update mot-encoder.cpp --- src/mot-encoder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp index 493c3d2..9eb28b8 100644 --- a/src/mot-encoder.cpp +++ b/src/mot-encoder.cpp @@ -59,6 +59,7 @@ extern "C" { #define MAXSEGLEN 8179 #define MAXDLS 128 // limit defined in ETSI TS 102 980 #define MAXSLIDESIZE 50000 +#define MAXSLIDEID 9999 // Do not allow the image compressor to go below // JPEG quality 40 @@ -95,7 +96,7 @@ struct slide_metadata_t { // complete path to slide std::string filepath; - // index, values from 0 to 9999, rolls over + // index, values from 0 to MAXSLIDEID, rolls over int fidx; // This is used to define the order in which several discovered @@ -278,8 +279,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "mot-encoder Error: cannot open directory '%s'\n", dir); return 1; } - if (fidx == 9999) { + if (fidx == MAXSLIDEID) { fidx = 0; + transmission_history.clear(); } // Add new slides to transmit to list -- cgit v1.2.3