summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-08 11:27:14 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-08 11:27:14 +0100
commitd02e03907214808ce9da9eb9a2267ff577e85559 (patch)
treed7120d96de3e00cfc7c77bede4c2212c7059ec64 /src/lib/player.cc
parent3bcfb29555c8af6b1227b9048c8c851fb4b16850 (diff)
Player is not finished if it's still filling in blank space.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 081174acc..392804ee8 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -537,13 +537,14 @@ Player::pass ()
}
}
+ bool filled = false;
if (_last_video_time) {
- fill_video (DCPTimePeriod (_last_video_time.get(), earliest ? earliest_content : _playlist->length()));
+ filled = fill_video (DCPTimePeriod (_last_video_time.get(), earliest ? earliest_content : _playlist->length()));
} else if (_last_seek_time) {
- fill_video (DCPTimePeriod (_last_seek_time.get(), _last_seek_time.get() + one_video_frame ()));
+ filled = fill_video (DCPTimePeriod (_last_seek_time.get(), _last_seek_time.get() + one_video_frame ()));
}
- if (!earliest) {
+ if (!earliest && !filled) {
return true;
}
@@ -934,10 +935,11 @@ Player::resampler (shared_ptr<const AudioContent> content, AudioStreamPtr stream
return r;
}
-void
+bool
Player::fill_video (DCPTimePeriod period)
{
/* XXX: this may not work for 3D */
+ bool filled = false;
BOOST_FOREACH (DCPTimePeriod i, subtract(period, _no_video)) {
for (DCPTime j = i.from; j < i.to; j += one_video_frame()) {
if (_playlist->video_content_at(j) && _last_video) {
@@ -945,8 +947,10 @@ Player::fill_video (DCPTimePeriod period)
} else {
emit_video (black_player_video_frame(), j);
}
+ filled = true;
}
}
+ return filled;
}
void