summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-20 23:42:28 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-20 23:42:28 +0100
commitcb6729aa79b555b219974207fbe2ff0510f9d3ea (patch)
tree973024e5dbf8bd8d873850909665e6229138ef57 /src/lib/dcp_subtitle_decoder.cc
parentd24251b2e0d82236f93ee5415b72849dee2a0ac8 (diff)
Bump libdcp for better verification, and make API adjustments.
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.cc')
-rw-r--r--src/lib/dcp_subtitle_decoder.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc
index 5372df0a5..1b144f204 100644
--- a/src/lib/dcp_subtitle_decoder.cc
+++ b/src/lib/dcp_subtitle_decoder.cc
@@ -67,7 +67,7 @@ DCPSubtitleDecoder::seek (ContentTime time, bool accurate)
Decoder::seek (time, accurate);
_next = _subtitles.begin ();
- list<shared_ptr<dcp::Subtitle> >::const_iterator i = _subtitles.begin ();
+ auto i = _subtitles.begin ();
while (i != _subtitles.end() && ContentTime::from_seconds ((*_next)->in().as_seconds()) < time) {
++i;
}
@@ -92,7 +92,7 @@ DCPSubtitleDecoder::pass ()
ContentTimePeriod const p = content_time_period (*_next);
while (_next != _subtitles.end () && content_time_period (*_next) == p) {
- shared_ptr<dcp::SubtitleString> ns = dynamic_pointer_cast<dcp::SubtitleString>(*_next);
+ auto ns = dynamic_pointer_cast<const dcp::SubtitleString>(*_next);
if (ns) {
s.push_back (*ns);
++_next;
@@ -101,7 +101,7 @@ DCPSubtitleDecoder::pass ()
this would need to be done both here and in DCPDecoder.
*/
- shared_ptr<dcp::SubtitleImage> ni = dynamic_pointer_cast<dcp::SubtitleImage>(*_next);
+ auto ni = dynamic_pointer_cast<const dcp::SubtitleImage>(*_next);
if (ni) {
emit_subtitle_image (p, *ni, film()->frame_size(), only_text());
++_next;
@@ -114,12 +114,12 @@ DCPSubtitleDecoder::pass ()
}
ContentTimePeriod
-DCPSubtitleDecoder::content_time_period (shared_ptr<dcp::Subtitle> s) const
+DCPSubtitleDecoder::content_time_period (shared_ptr<const dcp::Subtitle> s) const
{
- return ContentTimePeriod (
- ContentTime::from_seconds (s->in().as_seconds ()),
- ContentTime::from_seconds (s->out().as_seconds ())
- );
+ return {
+ ContentTime::from_seconds(s->in().as_seconds()),
+ ContentTime::from_seconds(s->out().as_seconds())
+ };
}