X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fplaylist.cc;h=16c740943ca89f382f27082ba70a935d987c484b;hp=5203160a876373258748e6c7b0f0663c3375d66c;hb=8d58a7c5f4320ad5c111e336c45e44d6b51ab509;hpb=4e411ea97b4dab8a5fa282d1d4cf7971ef1e24ad diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 5203160a8..16c740943 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -186,19 +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; - } - } - - return false; -} - class FrameRateCandidate { public: @@ -306,7 +293,7 @@ Playlist::active_frame_rate_change (DCPTime t, int dcp_video_frame_rate) const for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { shared_ptr vc = dynamic_pointer_cast (*i); if (!vc) { - break; + continue; } if (vc->position() >= t && t < vc->end()) { @@ -379,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 @@ -407,10 +393,7 @@ Playlist::move_later (shared_ptr c) return; } - 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 (); }