/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include <asdcp/KM_log.h>
#include <dcp/atmos_asset.h>
#include <dcp/exceptions.h>
+#include <dcp/raw_convert.h>
#include <libxml++/libxml++.h>
#include "i18n.h"
AtmosMXFContent::AtmosMXFContent (cxml::ConstNodePtr node, int)
: Content (node)
{
-
+ /* This was mistakenly left out for a while, so make sure we at least don't
+ * crash if an old Film is loaded.
+ */
+ _length = node->optional_number_child<Frame>("Length").get_value_or(0);
}
bool
{
node->add_child("Type")->add_child_text ("AtmosMXF");
Content::as_xml (node, with_paths);
+ node->add_child("Length")->add_child_text(dcp::raw_convert<string>(_length));
}
DCPTime