aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2015-12-13 20:43:34 +0100
committerStefan Pöschel <github@basicmaster.de>2015-12-13 20:43:34 +0100
commite42e5cc2ad0a0d9b83cac02cae883e07a37628e5 (patch)
tree0d12206d243f6ed364f026549ea62c492130e37b
parent36d053ea172493cc13c4d184634f8941d7c64be5 (diff)
downloadODR-AudioEnc-e42e5cc2ad0a0d9b83cac02cae883e07a37628e5.tar.gz
ODR-AudioEnc-e42e5cc2ad0a0d9b83cac02cae883e07a37628e5.tar.bz2
ODR-AudioEnc-e42e5cc2ad0a0d9b83cac02cae883e07a37628e5.zip
MOT encoder: save some bytes in MOT header ContentName
-rw-r--r--src/mot-encoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index d2014e3..4268d58 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -1280,9 +1280,9 @@ encodefile_out:
uint8_vector_t createMotHeader(size_t blobsize, int fidx, bool jfif_not_png)
{
// prepare ContentName
- uint8_t cntemp[13]; // = 1 + 11 + 1 = charset + name + terminator
+ uint8_t cntemp[10]; // = 1 + 8 + 1 = charset + name + terminator
cntemp[0] = 0x0 << 4; // charset: 0 (Complete EBU Latin based) - doesn't really matter here
- snprintf((char*) (cntemp + 1), sizeof(cntemp) - 1, "img%04d.%s", fidx, jfif_not_png ? "jpg" : "png");
+ snprintf((char*) (cntemp + 1), sizeof(cntemp) - 1, "%04d.%s", fidx, jfif_not_png ? "jpg" : "png");
if (verbose)
fprintf(stderr, "mot-encoder writing image as '%s'\n", cntemp + 1);
@@ -1292,7 +1292,7 @@ uint8_vector_t createMotHeader(size_t blobsize, int fidx, bool jfif_not_png)
// TriggerTime: NOW
header.AddExtension32Bit(0x05, 0x00000000);
- // ContentName: imgXXXX.jpg / imgXXXX.png
+ // ContentName: XXXX.jpg / XXXX.png
header.AddExtensionVarSize(0x0C, cntemp, sizeof(cntemp) - 1); // omit terminator
return header.GetData();