From 644bb89cb752eb89d639e16ee0bff70d25a75750 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 9 Jun 2015 14:07:35 +0100 Subject: [PATCH] Bump libdcp. --- cscript | 2 +- src/lib/dcp_subtitle.cc | 10 +--------- src/lib/writer.cc | 26 ++------------------------ 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/cscript b/cscript index 4b8a86d5b..79eb11d7f 100644 --- a/cscript +++ b/cscript @@ -207,7 +207,7 @@ def make_spec(filename, version, target): def dependencies(target): return (('ffmpeg-cdist', '0492ad2'), - ('libdcp', '6425742'), + ('libdcp', 'e4b8bed'), ('libsub', 'f66b11f')) def configure_options(target): diff --git a/src/lib/dcp_subtitle.cc b/src/lib/dcp_subtitle.cc index 66cee4ad8..9963d0a94 100644 --- a/src/lib/dcp_subtitle.cc +++ b/src/lib/dcp_subtitle.cc @@ -39,15 +39,7 @@ DCPSubtitle::load (boost::filesystem::path file) const if (!sc) { try { - sc.reset (new dcp::SMPTESubtitleAsset (file, true)); - } catch (...) { - - } - } - - if (!sc) { - try { - sc.reset (new dcp::SMPTESubtitleAsset (file, false)); + sc.reset (new dcp::SMPTESubtitleAsset (file)); } catch (...) { } diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 7091930f4..9e2cf4bd4 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -505,43 +505,23 @@ Writer::finish () shared_ptr mono = dynamic_pointer_cast (_picture_asset); if (mono) { reel->add (shared_ptr (new dcp::ReelMonoPictureAsset (mono, 0))); - dcp.add (mono); } shared_ptr stereo = dynamic_pointer_cast (_picture_asset); if (stereo) { reel->add (shared_ptr (new dcp::ReelStereoPictureAsset (stereo, 0))); - dcp.add (stereo); } if (_sound_asset) { reel->add (shared_ptr (new dcp::ReelSoundAsset (_sound_asset, 0))); - dcp.add (_sound_asset); } if (_subtitle_asset) { boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf"; - /* Add all the fonts to the subtitle content and as assets to the DCP */ + /* Add all the fonts to the subtitle content */ BOOST_FOREACH (shared_ptr i, _fonts) { - boost::filesystem::path const from = i->file.get_value_or (liberation); - _subtitle_asset->add_font (i->id, from.leaf().string ()); - - boost::filesystem::path to = _film->dir (_film->dcp_name ()) / _subtitle_asset->id (); - boost::filesystem::create_directories (to, ec); - if (ec) { - throw FileError (_("Could not create directory"), to); - } - - to /= from.leaf(); - - boost::system::error_code ec; - boost::filesystem::copy_file (from, to, ec); - if (ec) { - throw FileError ("Could not copy font to DCP", from); - } - - dcp.add (shared_ptr (new dcp::Font (to))); + _subtitle_asset->add_font (i->id, i->file.get_value_or (liberation)); } _subtitle_asset->write ( @@ -556,8 +536,6 @@ Writer::finish () 0 ) )); - - dcp.add (_subtitle_asset); } cpl->add (reel); -- 2.30.2