SRT parser: add debug output

This commit is contained in:
Moritz Bunkus 2019-08-10 15:58:33 +02:00
parent ac2a26369c
commit 5d18a7d804
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,8 @@ srt_parser_c::parse() {
line_number++;
strip_back(s);
mxdebug_if(m_debug, fmt::format("line {0} state {1} content »{2}«\n", line_number, state == STATE_INITIAL ? "initial" : state == STATE_TIME ? "time" : state == STATE_SUBS ? "subs" : "subs-or-number", s));
if (s.empty()) {
if ((STATE_INITIAL == state) || (STATE_TIME == state))
continue;

View File

@ -88,6 +88,7 @@ protected:
const std::string &m_file_name;
int64_t m_tid;
bool m_coordinates_warning_shown;
debugging_option_c m_debug{"srt_parser"};
public:
srt_parser_c(mm_text_io_cptr const &io, const std::string &file_name, int64_t tid);