projects
/
libsub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
877f212
)
Fix incorrect calculation of extension block number (EBN); previously
author
Carl Hetherington
<cth@carlh.net>
Wed, 1 Apr 2020 13:24:01 +0000
(13:24 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 1 Apr 2020 13:28:44 +0000
(15:28 +0200)
an incorrect 0 would be used if the line length was exactly 112.
src/stl_binary_writer.cc
patch
|
blob
|
history
diff --git
a/src/stl_binary_writer.cc
b/src/stl_binary_writer.cc
index 456bbe17ff0c035f7967e25f4ff8d61ec65fbd46..adb9e1145c75736bd9ca11fe987350eb2d73953b 100644
(file)
--- a/
src/stl_binary_writer.cc
+++ b/
src/stl_binary_writer.cc
@@
-272,7
+272,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];