}
}
+ 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;
}
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) {
} else {
emit_video (black_player_video_frame(), j);
}
+ filled = true;
}
}
+ return filled;
}
void
void subtitle_stop (boost::weak_ptr<Piece>, ContentTime);
boost::shared_ptr<Resampler> resampler (boost::shared_ptr<const AudioContent> content, AudioStreamPtr stream, bool create);
DCPTime one_video_frame () const;
- void fill_video (DCPTimePeriod period);
+ bool fill_video (DCPTimePeriod period);
void fill_audio (DCPTimePeriod period);
void audio_flush (boost::shared_ptr<Piece>, AudioStreamPtr stream);
void audio_transform (boost::shared_ptr<AudioContent> content, AudioStreamPtr stream, ContentAudio content_audio, DCPTime time);