diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-15 09:13:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-15 09:13:33 +0100 |
| commit | 6708d52b5c2ff9ccb6ee99f3b793d791bb95f26b (patch) | |
| tree | f5c440174ba346041cb79195bf83ec694ea51c21 /src/lib/subrip_decoder.cc | |
| parent | 5585138e5bd341edc78228869ec72de3cecf9015 (diff) | |
Fix invalid Interop subtitle times in some cases.
Use a much higher "timecode rate" (1000 rather than 24) when
representing the time of subtitles internally so that accuracy
is preserved and we don't end up rounding things up to give
out of range results.
Diffstat (limited to 'src/lib/subrip_decoder.cc')
| -rw-r--r-- | src/lib/subrip_decoder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/subrip_decoder.cc b/src/lib/subrip_decoder.cc index 2de272481..32d50d86b 100644 --- a/src/lib/subrip_decoder.cc +++ b/src/lib/subrip_decoder.cc @@ -67,8 +67,8 @@ SubRipDecoder::pass () dcp::Colour (j->colour.r * 255, j->colour.g * 255, j->colour.b * 255), j->font_size.points (72 * 11), 1.0, - dcp::Time (_subtitles[_next].from.all_as_seconds()), - dcp::Time (_subtitles[_next].to.all_as_seconds()), + dcp::Time (_subtitles[_next].from.all_as_seconds(), 1000), + dcp::Time (_subtitles[_next].to.all_as_seconds(), 1000), 0, dcp::HALIGN_CENTER, i->vertical_position.line.get() * (1.5 / 22) + 0.8, @@ -76,8 +76,8 @@ SubRipDecoder::pass () j->text, dcp::NONE, dcp::Colour (255, 255, 255), - 0, - 0 + dcp::Time (0, 1000), + dcp::Time (0, 1000) ) ); } |
