Remove some left-over JSON bits.
[dcpomatic.git] / src / lib / content.cc
index 1ec607d394896b8ec0dbdc7ad1dbeacb7cfb7393..7966219ff60a4bf186a3af6ce58a6b52aa0a97e5 100644 (file)
@@ -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 (int64_t (0), full_length() - trim_start() - trim_end());
 }
 
 /** @param t A time relative to the start of this content (not the position).