summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-15 16:36:28 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-15 16:36:28 +0000
commit4e5d5c7dcc6470b8dc918d03a00e30c07df60efe (patch)
treec167419e927f260348b468aae5036815a6a640a5 /src/lib/player.cc
parente8204f55c981493b99814f71a50b3c3d62601032 (diff)
parentf71a23109d774dc65e4262e5dba41360732cf342 (diff)
Merge master.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 260476242..77630f0e3 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -291,6 +291,7 @@ Player::emit_video (weak_ptr<Piece> weak_piece, shared_ptr<DecodedVideo> video)
pi->set_subtitle (_out_subtitle.image, _out_subtitle.position + container_offset);
}
+
#ifdef DCPOMATIC_DEBUG
_last_video = piece->content;
@@ -661,8 +662,22 @@ Player::update_subtitle ()
true
);
+<<<<<<< HEAD
_out_subtitle.from = _in_subtitle.subtitle->dcp_time;
_out_subtitle.to = _in_subtitle.subtitle->dcp_time_to;
+=======
+ /* XXX: hack */
+ Time from = _in_subtitle.from;
+ Time to = _in_subtitle.to;
+ shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (piece->content);
+ if (vc) {
+ from = rint (from * vc->video_frame_rate() / _film->video_frame_rate());
+ to = rint (to * vc->video_frame_rate() / _film->video_frame_rate());
+ }
+
+ _out_subtitle.from = from * piece->content->position ();
+ _out_subtitle.to = to + piece->content->position ();
+>>>>>>> master
}
/** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles.