X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplaylist.cc;h=1c65d1326b3d57e74e8b819553388c97bca94570;hb=74fe68e5895654e27a7cf8097917c1e95fa89519;hp=e555db9ba7387d55fccf963fb5015663233a5fdc;hpb=4d54b053b6e9565e026554b1dba31d73a1b492ae;p=dcpomatic.git diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index e555db9ba..1c65d1326 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -186,24 +186,6 @@ Playlist::remove (ContentList c) Changed (); } -bool -Playlist::has_subtitles () const -{ - for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { - shared_ptr fc = dynamic_pointer_cast (*i); - if (fc && !fc->subtitle_streams().empty()) { - return true; - } - - shared_ptr sc = dynamic_pointer_cast (*i); - if (sc) { - return true; - } - } - - return false; -} - class FrameRateCandidate { public: @@ -384,13 +366,12 @@ Playlist::move_earlier (shared_ptr c) if (previous == _content.end ()) { return; } + DCPTime const p = (*previous)->position (); (*previous)->set_position (p + c->length_after_trim ()); c->set_position (p); sort (_content.begin(), _content.end(), ContentSorter ()); - - Changed (); } void @@ -414,8 +395,6 @@ Playlist::move_later (shared_ptr c) DCPTime const p = (*next)->position (); (*next)->set_position (c->position ()); - c->set_position (p + c->length_after_trim ()); + c->set_position (c->position() + c->length_after_trim ()); sort (_content.begin(), _content.end(), ContentSorter ()); - - Changed (); }