X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fseek_zero_test.cc;h=07f9e3694b15af5d09044975f3f7ab2e765d96b6;hb=e6f28e7cda23c1ba3c49cc1bf2dc1491c2f87160;hp=0987f6b9b20e44f9a48da63a68cf2cb3fece309f;hpb=ad49361b303d1ceff7048fa0e89ba609ca9ce376;p=dcpomatic.git diff --git a/test/seek_zero_test.cc b/test/seek_zero_test.cc index 0987f6b9b..07f9e3694 100644 --- a/test/seek_zero_test.cc +++ b/test/seek_zero_test.cc @@ -32,6 +32,7 @@ using std::cout; using boost::shared_ptr; +using boost::dynamic_pointer_cast; BOOST_AUTO_TEST_CASE (seek_zero_test) { @@ -40,16 +41,14 @@ BOOST_AUTO_TEST_CASE (seek_zero_test) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); shared_ptr content (new FFmpegContent (film, "test/data/count300bd48.m2ts")); - content->set_ratio (Ratio::from_id ("185")); + content->set_scale (VideoContentScale (Ratio::from_id ("185"))); film->examine_and_add_content (content); wait_for_jobs (); - FFmpegDecoder decoder (film, content, true, false); - shared_ptr a = decoder.peek (); - cout << a->content_time << "\n"; - decoder.seek (0, true); - shared_ptr b = decoder.peek (); - cout << b->content_time << "\n"; + FFmpegDecoder decoder (content, film->log(), true, false, false); + shared_ptr a = dynamic_pointer_cast (decoder.peek ()); + decoder.seek (ContentTime(), true); + shared_ptr b = dynamic_pointer_cast (decoder.peek ()); /* a will be after no seek, and b after a seek to zero, which should have the same effect.