diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-31 01:11:22 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-31 01:11:22 +0000 |
| commit | 030c74f085718ea276c6e55a7a7c7de267a9ebf3 (patch) | |
| tree | eb52b38d0ae02a1bdc906435c199eb481a6e586c /src | |
| parent | a1839a88ab0cffdf04737dae783c21f27f65d491 (diff) | |
Fix set_position() causing a re-sort.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/playlist.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index e3d0c8ebb..b5faec567 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -426,9 +426,10 @@ Playlist::move_earlier (shared_ptr<Content> c) return; } + shared_ptr<Content> previous_c = *previous; - DCPTime const p = (*previous)->position (); - (*previous)->set_position (p + c->length_after_trim ()); + DCPTime const p = previous_c->position (); + previous_c->set_position (p + c->length_after_trim ()); c->set_position (p); } @@ -449,8 +450,10 @@ Playlist::move_later (shared_ptr<Content> c) return; } - (*next)->set_position (c->position ()); - c->set_position (c->position() + (*next)->length_after_trim ()); + shared_ptr<Content> next_c = *next; + + next_c->set_position (c->position ()); + c->set_position (c->position() + next_c->length_after_trim ()); } int64_t |
