Assert that entry_point and intrinsic_duration are not completely bogus.
authorCarl Hetherington <cth@carlh.net>
Sun, 17 Jan 2021 23:21:34 +0000 (00:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 17 Jan 2021 23:21:34 +0000 (00:21 +0100)
src/reel_asset.cc

index 5c05e33c7c00cf455dc944839f5591ff4b61ddd9..bb2cd5b74eb2ac73d13e9e6266a1629ba941ec64 100644 (file)
@@ -39,6 +39,7 @@
 #include "reel_asset.h"
 #include "asset.h"
 #include "compose.hpp"
+#include "dcp_assert.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 
@@ -62,7 +63,7 @@ ReelAsset::ReelAsset (string id, Fraction edit_rate, int64_t intrinsic_duration,
        , _edit_rate (edit_rate)
        , _entry_point (entry_point)
 {
-
+       DCP_ASSERT (_entry_point <= _intrinsic_duration);
 }
 
 ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)