summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-24 10:06:43 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-24 10:06:43 +0000
commit4748801aad27c1a677e0f14d9d836eddecf3fb5e (patch)
tree5bf04155c2148477047ffc9c301bbdedb9c913ae /src/lib
parent69d1cc1d80de988da9fabb33d52fc926a1cad62d (diff)
Fix sequencing when there is video+subtitle content.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/playlist.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index 4c07a0d52..82a4666cd 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -100,6 +100,11 @@ Playlist::maybe_sequence ()
_sequencing = true;
+ /* Keep track of the content that we've set the position of so that we don't
+ do it twice.
+ */
+ ContentList placed;
+
/* Video */
DCPTime next_left;
@@ -117,6 +122,8 @@ Playlist::maybe_sequence ()
vc->set_position (next_left);
next_left = vc->end();
}
+
+ placed.push_back (vc);
}
/* Subtitles */
@@ -124,7 +131,7 @@ Playlist::maybe_sequence ()
DCPTime next;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (i);
- if (!sc) {
+ if (!sc || !sc->has_subtitles() || find (placed.begin(), placed.end(), i) != placed.end()) {
continue;
}