diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-28 17:53:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-29 20:04:36 +0100 |
| commit | a0d1dd5d91c81ec9907cbc7b890905c463c18f62 (patch) | |
| tree | 3dc0b2e5b7e3a4e7da7d687c8713e0b461ce2aeb /test | |
| parent | 2da067ce01a04964dd5d739ea695504517877507 (diff) | |
Replace Time::frames with Time::frames_round and Time::frames_floor.
I believe both are necessary; doing floor instead of round caused #648.
Diffstat (limited to 'test')
| -rw-r--r-- | test/audio_decoder_test.cc | 2 | ||||
| -rw-r--r-- | test/dcpomatic_time_test.cc | 3 | ||||
| -rw-r--r-- | test/seek_zero_test.cc | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/test/audio_decoder_test.cc b/test/audio_decoder_test.cc index 6816c1fbb..8af5dfb11 100644 --- a/test/audio_decoder_test.cc +++ b/test/audio_decoder_test.cc @@ -87,7 +87,7 @@ public: void seek (ContentTime t, bool accurate) { AudioDecoder::seek (t, accurate); - _position = t.frames (_test_audio_content->resampled_audio_frame_rate ()); + _position = t.frames_round (_test_audio_content->resampled_audio_frame_rate ()); } private: diff --git a/test/dcpomatic_time_test.cc b/test/dcpomatic_time_test.cc index 4462ae870..2b42d22b8 100644 --- a/test/dcpomatic_time_test.cc +++ b/test/dcpomatic_time_test.cc @@ -28,8 +28,7 @@ BOOST_AUTO_TEST_CASE (dcpomatic_time_test) for (int64_t i = 0; i < 62000; i += 2000) { DCPTime d (i); ContentTime c (d, frc); - std::cout << i << " " << d << " " << c << " " << c.frames (24.0) << " " << j << "\n"; - BOOST_CHECK_EQUAL (c.frames (24.0), j); + BOOST_CHECK_EQUAL (c.frames_floor (24.0), j); ++k; if (k == 2) { ++j; diff --git a/test/seek_zero_test.cc b/test/seek_zero_test.cc index 7f661b21c..5f870ba41 100644 --- a/test/seek_zero_test.cc +++ b/test/seek_zero_test.cc @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test) video_delay = ContentTime (); } - Frame const first_frame = video_delay.round_up (content->video_frame_rate ()).frames (content->video_frame_rate ()); + Frame const first_frame = video_delay.round_up (content->video_frame_rate ()).frames_round (content->video_frame_rate ()); FFmpegDecoder decoder (content, film->log()); list<ContentVideo> a = decoder.get_video (first_frame, true); |
