diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-14 17:39:32 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-20 11:20:25 +0000 |
| commit | 3f630fb8334238ab8a58fbe1a0f513ae2c00de80 (patch) | |
| tree | 4b773b91029d6374bfd4f2194053d3e249d597cd /src/stl_binary_writer.cc | |
| parent | 49cafda01b3e07c47e3b20dd5ee91e1426446aea (diff) | |
Simplify time representation; better in-tree DCP subtitle parser.
Diffstat (limited to 'src/stl_binary_writer.cc')
| -rw-r--r-- | src/stl_binary_writer.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index b9ad86f..43b0adf 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -209,15 +209,15 @@ sub::write_stl_binary ( /* Cumulative status */ put_int_as_int (buffer + 4, tables.cumulative_status_enum_to_file (CUMULATIVE_STATUS_NOT_CUMULATIVE), 1); /* Time code in */ - put_int_as_int (buffer + 5, i->from.frame(frames_per_second).hours (), 1); - put_int_as_int (buffer + 6, i->from.frame(frames_per_second).minutes (), 1); - put_int_as_int (buffer + 7, i->from.frame(frames_per_second).seconds (), 1); - put_int_as_int (buffer + 8, i->from.frame(frames_per_second).frames (), 1); + put_int_as_int (buffer + 5, i->from.hours (), 1); + put_int_as_int (buffer + 6, i->from.minutes (), 1); + put_int_as_int (buffer + 7, i->from.seconds (), 1); + put_int_as_int (buffer + 8, i->from.frames_at (sub::Rational (frames_per_second * 1000, 1000)), 1); /* Time code out */ - put_int_as_int (buffer + 9, i->to.frame(frames_per_second).hours (), 1); - put_int_as_int (buffer + 10, i->to.frame(frames_per_second).minutes (), 1); - put_int_as_int (buffer + 11, i->to.frame(frames_per_second).seconds (), 1); - put_int_as_int (buffer + 12, i->to.frame(frames_per_second).frames (), 1); + put_int_as_int (buffer + 9, i->to.hours (), 1); + put_int_as_int (buffer + 10, i->to.minutes (), 1); + put_int_as_int (buffer + 11, i->to.seconds (), 1); + put_int_as_int (buffer + 12, i->to.frames_at (sub::Rational (frames_per_second * 1000, 1000)), 1); /* Vertical position */ int vp = 0; if (j->vertical_position.proportional) { |
