Basics of multiple captions per content so that DCPContent can
[dcpomatic.git] / src / lib / dcp_subtitle_decoder.cc
index c7a9a863f038b5993688bd5a0b7ccb0695c88dbe..3ed4a6827f98cf41c025bade2c2b54a4712a0710 100644 (file)
@@ -39,7 +39,7 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const DCPSubtitleContent> con
        if (_next != _subtitles.end()) {
                first = content_time_period(*_next).from;
        }
-       caption.reset (new CaptionDecoder (this, content->caption, log, first));
+       caption.push_back (shared_ptr<CaptionDecoder> (new CaptionDecoder (this, content->only_caption(), log, first)));
 }
 
 void
@@ -81,7 +81,7 @@ DCPSubtitleDecoder::pass ()
                /* XXX: image subtitles */
        }
 
-       caption->emit_plain (p, s);
+       only_caption()->emit_plain (p, s);
        return false;
 }