diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-04 01:13:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-04 01:13:13 +0000 |
| commit | 8af00f5e0862c18e8c7b5f9ac0ea95a5d6ad696c (patch) | |
| tree | 925d0673ec1c3319a8cc85374acb14a27d555c60 /src/lib/dcp_subtitle_content.cc | |
| parent | a5095486e606adfe36de635a48710cf98872c1c6 (diff) | |
Fix loading of SMPTE subtitles that are not MXF-wrapped.
Diffstat (limited to 'src/lib/dcp_subtitle_content.cc')
| -rw-r--r-- | src/lib/dcp_subtitle_content.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc index e814946f4..45c4be9b2 100644 --- a/src/lib/dcp_subtitle_content.cc +++ b/src/lib/dcp_subtitle_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include "font.h" #include "dcp_subtitle_content.h" #include <dcp/interop_subtitle_content.h> +#include <dcp/smpte_subtitle_content.h> #include <dcp/interop_load_font.h> #include <dcp/raw_convert.h> @@ -49,16 +50,16 @@ void DCPSubtitleContent::examine (shared_ptr<Job> job, bool calculate_digest) { Content::examine (job, calculate_digest); - - dcp::InteropSubtitleContent sc (path (0)); + shared_ptr<dcp::SubtitleContent> sc = load (path (0)); + boost::mutex::scoped_lock lm (_mutex); - _subtitle_language = sc.language (); - _length = DCPTime::from_seconds (sc.latest_subtitle_out().to_seconds ()); + _subtitle_language = sc->language (); + _length = DCPTime::from_seconds (sc->latest_subtitle_out().to_seconds ()); - list<shared_ptr<dcp::InteropLoadFont> > fonts = sc.load_font_nodes (); - for (list<shared_ptr<dcp::InteropLoadFont> >::const_iterator i = fonts.begin(); i != fonts.end(); ++i) { + list<shared_ptr<dcp::LoadFont> > fonts = sc->load_font_nodes (); + for (list<shared_ptr<dcp::LoadFont> >::const_iterator i = fonts.begin(); i != fonts.end(); ++i) { _fonts.push_back (shared_ptr<Font> (new Font ((*i)->id))); } } |
