summaryrefslogtreecommitdiff
path: root/src/stl_binary_writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-01 13:24:01 +0000
committerCarl Hetherington <cth@carlh.net>2020-04-01 13:24:01 +0000
commit7768ed0a0337b6634f6cc3c51f1eaf20c8715e30 (patch)
treeb7b0d1ad1daa2610606bd632adc08d055f6de9c4 /src/stl_binary_writer.cc
parent4638acbf4159be5ed4346db6afe90e15b63c5375 (diff)
Fix incorrect calculation of extension block number (EBN); previously
an incorrect 0 would be used if the line length was exactly 112.
Diffstat (limited to 'src/stl_binary_writer.cc')
-rw-r--r--src/stl_binary_writer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc
index a96aea9..7fa7b53 100644
--- a/src/stl_binary_writer.cc
+++ b/src/stl_binary_writer.cc
@@ -255,7 +255,7 @@ make_tti_blocks (list<Subtitle> const& subtitles, STLBinaryTables const& tables,
offset += this_time;
/* Extension block number. Count up from 0 but use 0xff for the last one */
- put_int_as_int (buffer + 3, this_time < block_size ? 0xff : block_number, 1);
+ put_int_as_int (buffer + 3, offset == text.length() ? 0xff : block_number, 1);
++block_number;
char* finished = new char[tti_size];