diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-13 14:46:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 334b94526f2c1271718a94fe97cfa843cf6ef7a1 (patch) | |
| tree | 67fa8769c7fb72ec6bff799c2a3d1b087454734a /src/lib/playlist.cc | |
| parent | 78664f8073256de51355c9162f61a4ae4fa560d7 (diff) | |
Basics of subtitle split.
Diffstat (limited to 'src/lib/playlist.cc')
| -rw-r--r-- | src/lib/playlist.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index f03f8a9a1..9df7857b5 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -21,6 +21,7 @@ #include "sndfile_content.h" #include "sndfile_decoder.h" #include "video_content.h" +#include "subtitle_content.h" #include "ffmpeg_decoder.h" #include "ffmpeg_content.h" #include "image_decoder.h" @@ -129,13 +130,12 @@ Playlist::maybe_sequence () DCPTime next; BOOST_FOREACH (shared_ptr<Content> i, _content) { - shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (i); - if (!sc || !sc->has_subtitles() || find (placed.begin(), placed.end(), i) != placed.end()) { + if (!i->subtitle || !i->subtitle->has_subtitles() || find (placed.begin(), placed.end(), i) != placed.end()) { continue; } - sc->set_position (next); - next = sc->end(); + i->set_position (next); + next = i->end(); } |
