Merge branch 'master' into 12bit
[dcpomatic.git] / src / lib / playlist.cc
index e847e623baf00d9f73150cc005c6e074dca4f4e6..c3e430082ecacd2a51db12edb1e5ee536b577fc6 100644 (file)
@@ -40,7 +40,6 @@ using std::vector;
 using std::min;
 using std::max;
 using std::string;
-using std::stringstream;
 using std::pair;
 using boost::optional;
 using boost::shared_ptr;
@@ -362,6 +361,7 @@ Playlist::move_earlier (shared_ptr<Content> c)
        if (previous == _content.end ()) {
                return;
        }
+
        
        Time const p = (*previous)->position ();
        (*previous)->set_position (p + c->length_after_trim ());
@@ -388,9 +388,8 @@ Playlist::move_later (shared_ptr<Content> c)
                return;
        }
 
-       Time 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 ());
 }