if (dv) {
if (!_just_did_inaccurate_seek && earliest_time > _video_position) {
- /* XXX: if we're inside some content, repeat the last frame... otherwise emit black */
- emit_black ();
+
+ /* See if we're inside some video content */
+ list<shared_ptr<Piece> >::iterator i = _pieces.begin();
+ while (i != _pieces.end() && ((*i)->content->position() >= _video_position || _video_position >= (*i)->content->end())) {
+ ++i;
+ }
+
+ if (i == _pieces.end() || !_last_incoming_video.video || !_have_valid_pieces) {
+ /* We're outside all video content */
+ emit_black ();
+ } else {
+ _last_incoming_video.video->dcp_time = _video_position;
+ emit_video (_last_incoming_video.weak_piece, _last_incoming_video.video);
+ }
} else {
emit_video (earliest_piece, dv);
earliest_piece->decoder->get ();
}
static void
-check_file (string ref, string check)
+check_file (boost::filesystem::path ref, boost::filesystem::path check)
{
uintmax_t N = boost::filesystem::file_size (ref);
- BOOST_CHECK_EQUAL (N, boost::filesystem::file_size(check));
+ BOOST_CHECK_EQUAL (N, boost::filesystem::file_size (check));
FILE* ref_file = fopen (ref.c_str(), "rb");
BOOST_CHECK (ref_file);
FILE* check_file = fopen (check.c_str(), "rb");
}
void
-check_dcp (string ref, string check)
+check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
{
libdcp::DCP ref_dcp (ref);
ref_dcp.read ();
extern void wait_for_jobs ();
extern boost::shared_ptr<Film> new_test_film (std::string);
-extern void check_dcp (std::string, std::string);
+extern void check_dcp (boost::filesystem::path, boost::filesystem::path);
extern void check_xml (boost::filesystem::path, boost::filesystem::path, std::list<std::string>);
extern boost::filesystem::path test_film_dir (std::string);
pixel_formats_test.cc
play_test.cc
ratio_test.cc
+ repeat_frame_test.cc
resampler_test.cc
scaling_test.cc
silence_padding_test.cc