From ebb198d38b672487a9d648e1bf81b795650cde1a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 10 May 2016 14:38:59 +0100 Subject: Fix some incorrect dynamic_pointer_casts. --- src/lib/player.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/player.cc b/src/lib/player.cc index 53df8a372..801e145af 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -420,7 +420,7 @@ Player::get_video (DCPTime time, bool accurate) /* Get video from appropriate piece(s) */ BOOST_FOREACH (shared_ptr piece, ov) { - shared_ptr decoder = dynamic_pointer_cast (piece->decoder); + shared_ptr decoder = piece->decoder->video; DCPOMATIC_ASSERT (decoder); shared_ptr dcp_content = dynamic_pointer_cast (piece->content); @@ -513,7 +513,7 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate) BOOST_FOREACH (shared_ptr i, ov) { DCPOMATIC_ASSERT (i->content->audio); - shared_ptr decoder = dynamic_pointer_cast (i->decoder); + shared_ptr decoder = i->decoder->audio; DCPOMATIC_ASSERT (decoder); /* The time that we should request from the content */ @@ -655,7 +655,7 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt, continue; } - shared_ptr subtitle_decoder = dynamic_pointer_cast ((*j)->decoder); + shared_ptr subtitle_decoder = (*j)->decoder->subtitle; ContentTime const from = dcp_to_content_subtitle (*j, time); /* XXX: this video_frame_rate() should be the rate that the subtitle content has been prepared for */ ContentTime const to = from + ContentTime::from_frames (1, _film->video_frame_rate ()); -- cgit v1.2.3