summaryrefslogtreecommitdiff
path: root/src/lib/subtitle_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-01-10 00:00:13 +0000
committerCarl Hetherington <cth@carlh.net>2018-01-10 00:00:13 +0000
commit21abc939394e249c8d10167153316153826b6b2d (patch)
tree1131ea2eccb54de7db37b09650abe53a31201b47 /src/lib/subtitle_decoder.cc
parent29623e179bfcb9c1e0dc7b2cb74dc9898953e4b6 (diff)
Hacky fix for crash introduced by subtitle appearance changes.
Diffstat (limited to 'src/lib/subtitle_decoder.cc')
-rw-r--r--src/lib/subtitle_decoder.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/subtitle_decoder.cc b/src/lib/subtitle_decoder.cc
index 714c784b1..3de097215 100644
--- a/src/lib/subtitle_decoder.cc
+++ b/src/lib/subtitle_decoder.cc
@@ -207,8 +207,14 @@ SubtitleDecoder::emit_text_start (ContentTime from, sub::Subtitle const & subtit
j.text,
dcp::NONE,
j.effect_colour.get_value_or(sub::Colour(0, 0, 0)).dcp(),
- dcp::Time (subtitle.fade_up.get_value_or(sub::Time()).all_as_seconds(), 1000),
- dcp::Time (subtitle.fade_down.get_value_or(sub::Time()).all_as_seconds(), 1000)
+ /* Hack: we should use subtitle.fade_up and subtitle.fade_down here
+ but the times of these often don't have a frame rate associated
+ with them so the sub::Time won't convert them to milliseconds without
+ throwing an exception. Since only DCP subs fill those in (and we don't
+ use libsub for DCP subs) we can cheat by just putting 0 in here.
+ */
+ dcp::Time (),
+ dcp::Time ()
)
);
}