X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.cc;h=617f7ec536530b71e83558f0f871b216cfe84312;hb=53d0a9a844841fe10b2720543c032a687c548108;hp=4743ecf42c228fb1dcb2b65ee021ecb7289ce96f;hpb=c8a036eb727ceddc64a0304d781c916eb952c001;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index 4743ecf42..617f7ec53 100644 --- a/src/lib/dcp_subtitle_decoder.cc +++ b/src/lib/dcp_subtitle_decoder.cc @@ -23,6 +23,7 @@ #include "dcp_subtitle_decoder.h" #include "font.h" #include "text_content.h" +#include "util.h" #include #include @@ -41,11 +42,17 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr film, shared_ptr< : Decoder (film) { /* Load the XML or MXF file */ - auto const c = load (content->path(0)); - c->fix_empty_font_ids (); - _subtitles = c->subtitles (); + auto const asset = load (content->path(0)); + asset->fix_empty_font_ids (); + _subtitles = asset->subtitles (); _next = _subtitles.begin (); + if (dynamic_pointer_cast(asset)) { + _standard = dcp::Standard::INTEROP; + } else { + _standard = dcp::Standard::SMPTE; + } + text.push_back (make_shared(this, content->only_text())); update_position(); } @@ -102,7 +109,7 @@ DCPSubtitleDecoder::pass () } } - only_text()->emit_plain (p, s); + only_text()->emit_plain(p, s, _standard); update_position();