diff options
author | Stefan Pöschel <github@basicmaster.de> | 2015-04-23 21:41:06 +0200 |
---|---|---|
committer | Stefan Pöschel <github@basicmaster.de> | 2015-04-23 21:41:06 +0200 |
commit | 870fdbf53cb167012ea2f85443ae36cfb4377aeb (patch) | |
tree | 38b213d7bffe85a076752dd430ce44bfeb0183ec | |
parent | 8580afba828de13ab1ce6af40c1f4d0f7c9d10a7 (diff) | |
download | ODR-PadEnc-870fdbf53cb167012ea2f85443ae36cfb4377aeb.tar.gz ODR-PadEnc-870fdbf53cb167012ea2f85443ae36cfb4377aeb.tar.bz2 ODR-PadEnc-870fdbf53cb167012ea2f85443ae36cfb4377aeb.zip |
Fix MAXDLS regression
-rw-r--r-- | src/mot-encoder.cpp | 5 |
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; |