X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.cc;h=6c95b8b1fa4aadcc99396e51d3e09102d7739104;hp=46256e93ef43f6d57607693f723658414b0d414e;hb=a5be11a965c2c38442e4e069874e7e21b5b43a5c;hpb=64a6a87dd4a3fd43665242b8a8b2b35a675a7839 diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index 46256e93e..6c95b8b1f 100644 --- a/src/lib/dcp_subtitle_decoder.cc +++ b/src/lib/dcp_subtitle_decoder.cc @@ -29,7 +29,8 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::bind; -DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr content, shared_ptr log) +DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr film, shared_ptr content) + : Decoder (film) { shared_ptr c (load (content->path (0))); _subtitles = c->subtitles (); @@ -39,7 +40,7 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr con if (_next != _subtitles.end()) { first = content_time_period(*_next).from; } - subtitle.reset (new SubtitleDecoder (this, content->subtitle, log, first)); + text.push_back (shared_ptr (new TextDecoder (this, content->only_text(), first))); } void @@ -63,8 +64,8 @@ DCPSubtitleDecoder::pass () /* Gather all subtitles with the same time period that are next on the list. We must emit all subtitles for the same time - period with the same text_subtitle() call otherwise the - SubtitleDecoder will assume there is nothing else at the + period with the same plain_text() call otherwise the + TextDecoder will assume there is nothing else at the time of emit the first. */ @@ -81,7 +82,7 @@ DCPSubtitleDecoder::pass () /* XXX: image subtitles */ } - subtitle->emit_text (p, s); + only_text()->emit_plain (p, s); return false; }