X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.cc;h=cc415629b2c3654a698ed470708d07e6f6cf5839;hb=27b83475435dda4e84a90cf59a52f150905c4ab1;hp=6a9de841d51f078bc41c6962b0230a473ce42876;hpb=d3c009991a782fa51e85828c7600994a9dd91559;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 6a9de841d..cc415629b 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -24,7 +24,7 @@ #include "video_decoder.h" #include "audio_decoder.h" #include "j2k_image_proxy.h" -#include "text_decoder.h" +#include "caption_decoder.h" #include "image.h" #include "config.h" #include @@ -62,9 +62,9 @@ DCPDecoder::DCPDecoder (shared_ptr c, shared_ptr log, boo if (c->audio) { audio.reset (new AudioDecoder (this, c->audio, log, fast)); } - if (c->subtitle) { + if (c->caption) { /* XXX: this time here should be the time of the first subtitle, not 0 */ - subtitle.reset (new TextDecoder (this, c->subtitle, log, ContentTime())); + caption.reset (new CaptionDecoder (this, c->caption, log, ContentTime())); } list > cpl_list = cpls (); @@ -209,7 +209,7 @@ DCPDecoder::pass_subtitles (ContentTime next) if (is) { list s; s.push_back (*is); - subtitle->emit_plain ( + caption->emit_plain ( ContentTimePeriod ( ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (i->in().as_seconds ()), ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (i->out().as_seconds ())