From 676db4cad279e2498ac0aa286fcbc3ad4a07caca Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Thu, 23 Apr 2015 21:41:06 +0200 Subject: Fix MAXDLS regression --- src/mot-encoder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 pad_t; static std::deque 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; -- cgit v1.2.3