X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.cc;h=f9b0d9a57461e92cb98e0578f86c7e920a259f59;hb=689fa55d1529ad88449ca464e9107c4dcc54d1cb;hp=4076936ddca2460898d06f4aae30046fbc3ef9ba;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 4076936dd..f9b0d9a57 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -60,27 +60,27 @@ using std::string; using std::vector; using std::shared_ptr; using std::dynamic_pointer_cast; +using std::make_shared; using boost::optional; using namespace dcpomatic; DCPDecoder::DCPDecoder (shared_ptr film, shared_ptr c, bool fast, bool tolerant, shared_ptr old) : DCP (c, tolerant) , Decoder (film) - , _decode_referenced (false) { if (c->can_be_played()) { if (c->video) { - video.reset (new VideoDecoder (this, c)); + video = make_shared(this, c); } if (c->audio) { - audio.reset (new AudioDecoder (this, c->audio, fast)); + audio = make_shared(this, c->audio, fast); } for (auto i: c->text) { /* XXX: this time here should be the time of the first subtitle, not 0 */ - text.push_back (shared_ptr (new TextDecoder (this, i, ContentTime()))); + text.push_back (make_shared(this, i, ContentTime())); } if (c->atmos) { - atmos.reset (new AtmosDecoder (this, c)); + atmos = make_shared(this, c); } } @@ -98,7 +98,7 @@ DCPDecoder::DCPDecoder (shared_ptr film, shared_ptr_reels; } else { - list > cpl_list = cpls (); + auto cpl_list = cpls (); if (cpl_list.empty()) { throw DCPError (_("No CPLs found in DCP.")); @@ -124,7 +124,6 @@ DCPDecoder::DCPDecoder (shared_ptr film, shared_ptr >::const_iterator decoder = text.begin (); + auto decoder = text.begin (); if (decoder == text.end()) { /* It's possible that there is now a main subtitle but no TextDecoders, for example if the CPL has just changed but the TextContent's texts have not been recreated yet.