X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fatmos_mxf_decoder.cc;h=19a19a8c4b5186189327981a8c400e6677a401ab;hp=6c7cda61a632e248d71470ff941db3f8b786b5da;hb=a498b8819ab431ecc2aac058b1aadb9e15d396ac;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 diff --git a/src/lib/atmos_mxf_decoder.cc b/src/lib/atmos_mxf_decoder.cc index 6c7cda61a..19a19a8c4 100644 --- a/src/lib/atmos_mxf_decoder.cc +++ b/src/lib/atmos_mxf_decoder.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,6 +18,7 @@ */ + #include "atmos_content.h" #include "atmos_decoder.h" #include "atmos_mxf_content.h" @@ -26,16 +27,20 @@ #include #include + +using std::make_shared; using std::shared_ptr; + AtmosMXFDecoder::AtmosMXFDecoder (std::shared_ptr film, std::shared_ptr content) : Decoder (film) , _content (content) { - atmos.reset (new AtmosDecoder(this, content)); + atmos = make_shared(this, content); - shared_ptr asset (new dcp::AtmosAsset(_content->path(0))); + auto asset = make_shared(_content->path(0)); _reader = asset->start_read (); + _reader->set_check_hmac (false); _metadata = AtmosMetadata (asset); } @@ -43,8 +48,8 @@ AtmosMXFDecoder::AtmosMXFDecoder (std::shared_ptr film, std::shared_ bool AtmosMXFDecoder::pass () { - double const vfr = _content->active_video_frame_rate (film()); - int64_t const frame = _next.frames_round (vfr); + auto const vfr = _content->active_video_frame_rate (film()); + auto const frame = _next.frames_round (vfr); if (frame >= _content->atmos->length()) { return true;