From: Carl Hetherington Date: Tue, 6 Oct 2015 14:36:42 +0000 (+0100) Subject: Make sure SMPTE subtitle MXFs get the right intrinsic duration. X-Git-Tag: v2.4.2~3 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=a6791850f8bf56f4a08cf860fdce8df2d3e13405;p=dcpomatic.git Make sure SMPTE subtitle MXFs get the right intrinsic duration. --- diff --git a/ChangeLog b/ChangeLog index 598636ff1..e3265c5e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-10-06 Carl Hetherington + * 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(_subtitle_asset)->set_intrinsic_duration ( + reel_picture_asset->intrinsic_duration () + ); + _subtitle_asset->write ( _film->dir (_film->dcp_name ()) / ("sub_" + _subtitle_asset->id() + ".mxf") );