#include "ui_signaller.h"
#include "exceptions.h"
#include "film.h"
+#include "safe_stringstream.h"
#include "i18n.h"
using std::string;
-using std::stringstream;
using std::set;
using std::list;
using std::cout;
using std::vector;
+using std::max;
using boost::shared_ptr;
using libdcp::raw_convert;
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).
string
Content::identifier () const
{
- stringstream s;
+ SafeStringStream s;
s << Content::digest()
<< "_" << position()