Fix vertical position referencing of subs in parse_line.
authorCarl Hetherington <cth@carlh.net>
Mon, 15 Feb 2016 11:34:02 +0000 (11:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 15 Feb 2016 23:18:34 +0000 (23:18 +0000)
src/ssa_reader.cc

index 703ed266d6a9da41ede364b5e832dd44ada936de..acaa46be4b0d5dc714474ffece2e9c09918f84b0 100644 (file)
@@ -138,6 +138,10 @@ SSAReader::parse_time (string t) const
                );
 }
 
+/** @param base RawSubtitle filled in with any required common values.
+ *  @param line SSA line string.
+ *  @return List of RawSubtitles to represent line with vertical reference TOP_OF_SUBTITLE.
+ */
 list<RawSubtitle>
 SSAReader::parse_line (RawSubtitle base, string line)
 {
@@ -152,6 +156,7 @@ SSAReader::parse_line (RawSubtitle base, string line)
        string style;
 
        current.vertical_position.line = 0;
+       current.vertical_position.reference = TOP_OF_SUBTITLE;
 
        for (size_t i = 0; i < line.length(); ++i) {
                char const c = line[i];