X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fatmos_content.cc;h=ada304dad1c698d5d167230b1f7b42ccbb6dc0ee;hb=6e09a576c0f1e36d442c40e1d3ddb6c29df8b7ea;hp=58e009c67273567a6658f2f1faf1b3f508ac8c13;hpb=e41108425892086d29f7cb200f1ad5f45986d686;p=dcpomatic.git diff --git a/src/lib/atmos_content.cc b/src/lib/atmos_content.cc index 58e009c67..ada304dad 100644 --- a/src/lib/atmos_content.cc +++ b/src/lib/atmos_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -21,11 +21,15 @@ #include "atmos_content.h" #include +#include +LIBDCP_DISABLE_WARNINGS #include +LIBDCP_ENABLE_WARNINGS +using std::make_shared; using std::string; -using boost::shared_ptr; +using std::shared_ptr; int const AtmosContentProperty::EDIT_RATE = 700; @@ -50,7 +54,11 @@ AtmosContent::AtmosContent (Content* parent, cxml::ConstNodePtr node) shared_ptr AtmosContent::from_xml (Content* parent, cxml::ConstNodePtr node) { - return shared_ptr (new AtmosContent(parent, node)); + if (!node->optional_node_child("AtmosLength")) { + return {}; + } + + return make_shared(parent, node); }