Merge master.
[dcpomatic.git] / src / lib / playlist.cc
index 710b9cc099ea5a9e96f6118f836c9ff1ab8c1cc9..16c740943ca89f382f27082ba70a935d987c484b 100644 (file)
@@ -366,6 +366,7 @@ Playlist::move_earlier (shared_ptr<Content> c)
        if (previous == _content.end ()) {
                return;
        }
+
        
        DCPTime const p = (*previous)->position ();
        (*previous)->set_position (p + c->length_after_trim ());
@@ -392,8 +393,7 @@ Playlist::move_later (shared_ptr<Content> 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 ());
 }