From a06e701131b813bc42ae81b9c5e8c7dbbfea7eb9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 2 Jun 2016 20:06:36 +0100 Subject: Fix errors with SSA subtitles containing commas. --- src/ssa_reader.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/ssa_reader.cc b/src/ssa_reader.cc index 859a00e..c76a78d 100644 --- a/src/ssa_reader.cc +++ b/src/ssa_reader.cc @@ -274,6 +274,15 @@ SSAReader::read (function ()> get_line) vector event; split (event, body, is_any_of (",")); + /* There may be commas in the subtitle part; reassemble any extra parts + from when we just split it. + */ + while (event.size() > event_format.size()) { + string const ex = event.back (); + event.pop_back (); + event.back() += "," + ex; + } + SUB_ASSERT (!event.empty()); SUB_ASSERT (event_format.size() == event.size()); -- cgit v1.2.3