summaryrefslogtreecommitdiffstats
path: root/src/mot-encoder.cpp
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2015-04-23 21:41:06 +0200
committerStefan Pöschel <github@basicmaster.de>2015-04-23 21:41:06 +0200
commit676db4cad279e2498ac0aa286fcbc3ad4a07caca (patch)
tree0f06a512b4bea98839bd9a9cf530f3266dadbf9e /src/mot-encoder.cpp
parentdce47c5c697dc1290d1a1cdfda773e991f90ce15 (diff)
downloadfdk-aac-676db4cad279e2498ac0aa286fcbc3ad4a07caca.tar.gz
fdk-aac-676db4cad279e2498ac0aa286fcbc3ad4a07caca.tar.bz2
fdk-aac-676db4cad279e2498ac0aa286fcbc3ad4a07caca.zip
Fix MAXDLS regression
Diffstat (limited to 'src/mot-encoder.cpp')
-rw-r--r--src/mot-encoder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index 3dd604e..5763f61 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -262,7 +262,7 @@ CharsetConverter charset_converter;
typedef std::vector<uint8_t> pad_t;
static std::deque<pad_t> dls_pads;
static bool dls_toggle = false;
-std::string dlstext_prev(MAXDLS + 1, ' ');
+std::string dlstext_prev = "";
static int verbose = 0;
@@ -982,7 +982,8 @@ void writeDLS(int output_fd, const std::string& dls_file, int padlen, uint8_t ch
ss << dls_lines[i];
}
std::string dlstext = ss.str();
- using namespace std;
+ if (dlstext.size() > MAXDLS)
+ dlstext.resize(MAXDLS);
if (dls_to_ebu)
charset = CHARSET_COMPLETE_EBU_LATIN;