diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-24 00:41:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-24 00:41:32 +0100 |
| commit | bc6ef3ae7644c256e2339366e5aa14c4fa4bbee4 (patch) | |
| tree | 2bf418ab859d9c11b433f55549c26cbae3b3631e /src/reel_asset.cc | |
| parent | 066e30f30f851396bd6f10d50a448507e1c0b392 (diff) | |
Remove <EntryPoint> and <Duration> from <ReelMarkerAsset> tags.
They should not be there:
"EntryPoint" ... "This element shall only be present when the
Asset refers to an external resource such as a Track File".
Fixes DoM bug #2215.
Diffstat (limited to 'src/reel_asset.cc')
| -rw-r--r-- | src/reel_asset.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/reel_asset.cc b/src/reel_asset.cc index f9742628..6b6bdc0b 100644 --- a/src/reel_asset.cc +++ b/src/reel_asset.cc @@ -49,22 +49,25 @@ LIBDCP_DISABLE_WARNINGS LIBDCP_ENABLE_WARNINGS -using std::pair; -using std::string; using std::make_pair; +using std::pair; using std::shared_ptr; +using std::string; using boost::optional; using namespace dcp; -ReelAsset::ReelAsset (string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelAsset::ReelAsset (string id, Fraction edit_rate, int64_t intrinsic_duration, optional<int64_t> entry_point) : Object (id) , _intrinsic_duration (intrinsic_duration) - , _duration (intrinsic_duration - entry_point) , _edit_rate (edit_rate) , _entry_point (entry_point) { - DCP_ASSERT (_entry_point <= _intrinsic_duration); + if (_entry_point) { + _duration = intrinsic_duration - *_entry_point; + } + + DCP_ASSERT (!_entry_point || *_entry_point <= _intrinsic_duration); } |
