Set up OV/VF in name according to whether DCP content has been referenced.
[dcpomatic.git] / src / lib / content.cc
index 65c005157846338dbb8f07889cc74885a30a6030..aa596f75a3f931ed0fc83b52914b737e6db600d4 100644 (file)
 #include "film.h"
 #include "safe_stringstream.h"
 #include "job.h"
+#include "compose.hpp"
 #include "raw_convert.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/thread/mutex.hpp>
+#include <iostream>
 
 #include "i18n.h"
 
@@ -223,11 +225,11 @@ Content::length_after_trim () const
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       return max (DCPTime (), full_length() - DCPTime (trim_start() - trim_end(), film->active_frame_rate_change (position ())));
+       return max (DCPTime (), full_length() - DCPTime (trim_start() + trim_end(), film->active_frame_rate_change (position ())));
 }
 
-/** @return string which includes everything about how this content affects
- *  its playlist.
+/** @return string which changes when something about this content changes which affects
+ *  the appearance of its video.
  */
 string
 Content::identifier () const