as in the problematic case we are about to emit a frame which is not contiguous with the previous.
*/
+ optional<DCPTime> fill_to;
if (_last_video_time) {
+ fill_to = _last_video_time;
+ } else if (_last_seek_time && _last_seek_accurate) {
+ fill_to = _last_seek_time;
+ }
+
+ if (fill_to) {
/* XXX: this may not work for 3D */
- BOOST_FOREACH (DCPTimePeriod i, subtract(DCPTimePeriod (*_last_video_time, time), _no_video)) {
+ BOOST_FOREACH (DCPTimePeriod i, subtract(DCPTimePeriod (*fill_to, time), _no_video)) {
for (DCPTime j = i.from; j < i.to; j += one_video_frame()) {
if (_last_video) {
emit_video (shared_ptr<PlayerVideo> (new PlayerVideo (*_last_video)), j);
static void
check (shared_ptr<PlayerVideo>, DCPTime time)
{
- BOOST_CHECK (time == next);
+ BOOST_REQUIRE (time == next);
next += frame;
}
next = DCPTime ();
frame = DCPTime::from_frames (1, film->video_frame_rate ());
while (!player->pass()) {}
- BOOST_CHECK (next == DCPTime::from_frames (video_length, film->video_frame_rate()));
+ BOOST_REQUIRE (next == DCPTime::from_frames (video_length, film->video_frame_rate()));
}
BOOST_AUTO_TEST_CASE (ffmpeg_decoder_sequential_test)
{
- ffmpeg_decoder_sequential_test_one ("boon_telly.mkv", 29.97, 6911);
+ ffmpeg_decoder_sequential_test_one ("boon_telly.mkv", 29.97, 6912);
ffmpeg_decoder_sequential_test_one ("Sintel_Trailer1.480p.DivX_Plus_HD.mkv", 24, 1253);
ffmpeg_decoder_sequential_test_one ("prophet_clip.mkv", 23.976, 2879);
}