diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-13 11:31:55 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-13 11:31:55 +0000 |
| commit | d15ef17dccf87b633d1971c38032a2049abe3db0 (patch) | |
| tree | 3bbde3c1959bae6b0ad064972f95bd9406416fbb /src/stl_binary_writer.cc | |
| parent | acca8cb950de132fbc4be40e7dc7d294c6cb0a38 (diff) | |
Re-work time.
Diffstat (limited to 'src/stl_binary_writer.cc')
| -rw-r--r-- | src/stl_binary_writer.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index b9ad86f..dedac84 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -92,7 +92,7 @@ put_int_as_int (char* p, int v, unsigned int n) void sub::write_stl_binary ( list<Subtitle> subtitles, - float frames_per_second, + FrameRate frame_rate, Language language, string original_programme_title, string original_episode_title, @@ -148,7 +148,7 @@ sub::write_stl_binary ( /* Code page: 850 */ put_string (buffer + 0, "850"); /* Disk format code */ - put_string (buffer + 3, stl_frame_rate_to_dfc (frames_per_second)); + put_string (buffer + 3, stl_frame_rate_to_dfc (frame_rate)); /* Display standard code: open subtitling */ put_string (buffer + 11, "0"); /* Character code table: Latin (ISO 6937) */ @@ -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 (frame_rate), 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 (frame_rate), 1); /* Vertical position */ int vp = 0; if (j->vertical_position.proportional) { |
