using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using boost::scoped_ptr;
Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist)
: _film (film)
property == ContentProperty::TRIM_END ||
property == ContentProperty::PATH ||
property == VideoContentProperty::VIDEO_FRAME_TYPE ||
- property == DCPContentProperty::CAN_BE_PLAYED
+ property == DCPContentProperty::CAN_BE_PLAYED ||
+ property == SubRipContentProperty::SUBTITLE_COLOUR ||
+ property == SubRipContentProperty::SUBTITLE_OUTLINE ||
+ property == SubRipContentProperty::SUBTITLE_OUTLINE_COLOUR
) {
_have_valid_pieces = false;
if (!j) {
continue;
}
- DCPDecoder decoder (j, false);
+
+ scoped_ptr<DCPDecoder> decoder;
+ try {
+ decoder.reset (new DCPDecoder (j, false));
+ } catch (...) {
+ return a;
+ }
+
int64_t offset = 0;
- BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder.reels()) {
+ BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder->reels()) {
DCPTime const from = i->position() + DCPTime::from_frames (offset, _film->video_frame_rate());
if (j->reference_video ()) {
a.push_back (
}
if (j->reference_subtitle ()) {
+ DCPOMATIC_ASSERT (k->main_subtitle ());
a.push_back (
ReferencedReelAsset (
k->main_subtitle (),