summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-22 15:54:24 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-22 15:54:24 +0000
commit6d39d3df8e2fed1ec5e13d54ce6cd22c59b69eba (patch)
treef451e2420bf1facba7aa78abe07f79ebef72ca30 /src
parentedcae629e58bd5b5309d607778917fd8aaa20e0c (diff)
Various fixes to film viewer.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 4cf66065b..a5f0006d9 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -143,7 +143,12 @@ Player::pass ()
if (dv && _video) {
DCPTime const half_frame = TIME_HZ / (2 * _film->video_frame_rate ());
- if (!_just_did_inaccurate_seek && earliest_time > (_video_position + half_frame)) {
+
+ if (_just_did_inaccurate_seek) {
+ /* Just emit; no subtlety */
+ emit_video (earliest_piece, dv);
+ earliest_piece->decoder->get ();
+ } else if (earliest_time > (_video_position + half_frame)) {
/* See if we're inside some video content */
list<shared_ptr<Piece> >::iterator i = _pieces.begin();
@@ -160,12 +165,12 @@ Player::pass ()
}
} else {
-
+
if (
dv->dcp_time >= _video_position &&
!earliest_piece->content->trimmed (dv->dcp_time - earliest_piece->content->position ())
) {
-
+
emit_video (earliest_piece, dv);
}
@@ -442,6 +447,11 @@ Player::setup_pieces ()
}
_have_valid_pieces = true;
+
+ /* The Piece for the _last_incoming_video will no longer be valid */
+ _last_incoming_video.video.reset ();
+
+ _video_position = _audio_position = 0;
}
void