summaryrefslogtreecommitdiff
path: root/src/stl_binary_writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-24 11:02:04 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-24 11:02:04 +0100
commit44a5e000d62230451cc35a239c7c3ba83d830bd7 (patch)
treec52cd924af02f2437ccc845b22dda350640ae9ae /src/stl_binary_writer.cc
parentd746b1b16f4aa093ecdad80376bf90456a7708d3 (diff)
Mark the first, only and hence last TTI block in a subtitle set as the last one, as per spec.
Diffstat (limited to 'src/stl_binary_writer.cc')
-rw-r--r--src/stl_binary_writer.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc
index 4453332..cb6c71a 100644
--- a/src/stl_binary_writer.cc
+++ b/src/stl_binary_writer.cc
@@ -208,8 +208,10 @@ sub::write_stl_binary (
put_int_as_int (buffer + 0, 1, 1);
/* Subtitle number */
put_int_as_int (buffer + 1, N, 2);
- /* Extension block number */
- put_int_as_int (buffer + 3, 0, 1);
+ /* Extension block number. Use 0xff here to indicate that it is the last TTI
+ block in this subtitle "set", as we only ever use one.
+ */
+ put_int_as_int (buffer + 3, 255, 1);
/* Cumulative status */
put_int_as_int (buffer + 4, tables.cumulative_status_enum_to_file (CUMULATIVE_STATUS_NOT_CUMULATIVE), 1);
/* Time code in */