- /* Working out the frc for this content is a bit tricky: what if it overlaps
- two pieces of video content with different frame rates? For now, use
- the one with the best overlap.
- */
-
- DCPTime best_overlap_t = 0;
- shared_ptr<VideoContent> best_overlap;
- for (ContentList::iterator j = content.begin(); j != content.end(); ++j) {
- shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*j);
- if (!vc) {
- continue;
- }
-
- DCPTime const overlap = max (vc->position(), sc->position()) - min (vc->end(), sc->end());
- if (overlap > best_overlap_t) {
- best_overlap = vc;
- best_overlap_t = overlap;
- }
- }
-
- if (best_overlap) {
- frc = FrameRateChange (best_overlap->video_frame_rate(), _film->video_frame_rate ());
- } else {
- /* No video overlap; e.g. if the DCP is just audio */
- frc = FrameRateChange (_film->video_frame_rate(), _film->video_frame_rate ());
- }
+ /* SubRipContent */
+ shared_ptr<const SubRipContent> rc = dynamic_pointer_cast<const SubRipContent> (*i);
+ if (rc) {
+ decoder.reset (new SubRipDecoder (_film, rc));
+ frc = best_overlap_frc;