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 (0L, full_length() - trim_start() - trim_end());
}
/** @param t A time relative to the start of this content (not the position).
} type = VIDEO;
for (list<shared_ptr<Piece> >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) {
- if ((*i)->decoder->done ()) {
+ if ((*i)->decoder->done () || (*i)->content->length_after_trim() == 0) {
continue;
}