diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-05 23:56:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-05 23:56:26 +0100 |
| commit | d39e59cbfff3b886af7a7d9c9c48f3f7f5928e43 (patch) | |
| tree | 605c8e2147936965e37b8938f71c8e601358d1bc /src/lib/content.cc | |
| parent | 2aee5a897a250c8834f47321aed99b9c7fbf6299 (diff) | |
A couple of fixes to hangs when over-trimming content.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 1ec607d39..4cdb23e83 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -36,6 +36,7 @@ using std::set; using std::list; using std::cout; using std::vector; +using std::max; using boost::shared_ptr; using libdcp::raw_convert; @@ -211,7 +212,7 @@ Content::technical_summary () const Time Content::length_after_trim () const { - return full_length() - trim_start() - trim_end(); + return max (0L, full_length() - trim_start() - trim_end()); } /** @param t A time relative to the start of this content (not the position). |
