summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-06 15:36:42 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-06 15:36:42 +0100
commita6791850f8bf56f4a08cf860fdce8df2d3e13405 (patch)
tree38dcb8a88284afa838c7414b2e2787e261f730b9
parentc53bf2c0860f6b0ff583ad9f4bc4c7e86d47fa94 (diff)
Make sure SMPTE subtitle MXFs get the right intrinsic duration.
-rw-r--r--ChangeLog3
-rw-r--r--src/lib/writer.cc7
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 598636ff1..e3265c5e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-10-06 Carl Hetherington <cth@carlh.net>
+ * Fix invalid SMPTE subtitle output
+ in some cases.
+
* Speculative support for multi-part
bitmap subtitles (#709).
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index bace6602d..3f856737b 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -617,6 +617,13 @@ Writer::finish ()
boost::filesystem::create_directories (directory);
_subtitle_asset->write (directory / ("sub_" + _subtitle_asset->id() + ".xml"));
} else {
+ /* All our assets should be the same length; use the picture asset length here
+ as a reference to set the subtitle one.
+ */
+ dynamic_pointer_cast<dcp::SMPTESubtitleAsset>(_subtitle_asset)->set_intrinsic_duration (
+ reel_picture_asset->intrinsic_duration ()
+ );
+
_subtitle_asset->write (
_film->dir (_film->dcp_name ()) / ("sub_" + _subtitle_asset->id() + ".mxf")
);