projects
/
libsub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bd500e
)
Fix errors with SSA subtitles containing commas.
author
Carl Hetherington
<cth@carlh.net>
Thu, 2 Jun 2016 19:06:36 +0000
(20:06 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 2 Jun 2016 19:06:36 +0000
(20:06 +0100)
src/ssa_reader.cc
patch
|
blob
|
history
diff --git
a/src/ssa_reader.cc
b/src/ssa_reader.cc
index 859a00ecba18cbb36ab79ba2a51ba01151ae3658..c76a78db34d006c4244e40f4d8e7423edfd5fc14 100644
(file)
--- a/
src/ssa_reader.cc
+++ b/
src/ssa_reader.cc
@@
-274,6
+274,15
@@
SSAReader::read (function<optional<string> ()> get_line)
vector<string> 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());