From 33de7ebf55a3059fa0f444c4b06ac00ad37cb5ae Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 May 2015 00:14:49 +0100 Subject: [PATCH] Fix writing of LoadFont tags in subtitles. --- src/lib/writer.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 569953641..d2116362e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -505,18 +505,6 @@ Writer::finish () } if (_subtitle_content) { - _subtitle_content->write_xml (_film->dir (_film->dcp_name ()) / _film->subtitle_xml_filename ()); - reel->add (shared_ptr ( - new dcp::ReelSubtitleAsset ( - _subtitle_content, - dcp::Fraction (_film->video_frame_rate(), 1), - _picture_mxf->intrinsic_duration (), - 0 - ) - )); - - dcp.add (_subtitle_content); - boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf"; /* Add all the fonts to the subtitle content and as assets to the DCP */ @@ -534,6 +522,18 @@ Writer::finish () LOG_WARNING_NC (String::compose ("Could not copy font %1 to DCP", from.string ())); } } + + _subtitle_content->write_xml (_film->dir (_film->dcp_name ()) / _film->subtitle_xml_filename ()); + reel->add (shared_ptr ( + new dcp::ReelSubtitleAsset ( + _subtitle_content, + dcp::Fraction (_film->video_frame_rate(), 1), + _picture_mxf->intrinsic_duration (), + 0 + ) + )); + + dcp.add (_subtitle_content); } cpl->add (reel); -- 2.30.2