From 820e8a20958361a3e8ead877bbb448dcf2c94bc4 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sun, 8 Mar 2015 22:24:12 -0500 Subject: [PATCH] Fixed a few more issue with the openshot::FrameMapper and openshot::FFmpegReader unit tests. --- tests/FFmpegReader_Tests.cpp | 2 +- tests/FrameMapper_Tests.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp index e7633fcd..5bcca0b4 100644 --- a/tests/FFmpegReader_Tests.cpp +++ b/tests/FFmpegReader_Tests.cpp @@ -60,7 +60,7 @@ TEST(FFmpegReader_Check_Audio_File) // Check audio properties CHECK_EQUAL(2, f->GetAudioChannelsCount()); - CHECK_EQUAL(333, f->GetAudioSamplesCount()); + CHECK_EQUAL(332, f->GetAudioSamplesCount()); // Check actual sample values (to be sure the waveform is correct) CHECK_CLOSE(0.0f, samples[0], 0.00001); diff --git a/tests/FrameMapper_Tests.cpp b/tests/FrameMapper_Tests.cpp index e6d4f62e..db9778ec 100644 --- a/tests/FrameMapper_Tests.cpp +++ b/tests/FrameMapper_Tests.cpp @@ -187,18 +187,18 @@ TEST(FrameMapper_resample_audio_48000_to_41000) // Check details CHECK_EQUAL(3, map.GetFrame(1)->GetAudioChannelsCount()); - CHECK_EQUAL(1459, map.GetFrame(1)->GetAudioSamplesCount()); - CHECK_EQUAL(1469, map.GetFrame(2)->GetAudioSamplesCount()); - CHECK_EQUAL(1469, map.GetFrame(50)->GetAudioSamplesCount()); + CHECK_EQUAL(1460, map.GetFrame(1)->GetAudioSamplesCount()); + CHECK_EQUAL(1470, map.GetFrame(2)->GetAudioSamplesCount()); + CHECK_EQUAL(1470, map.GetFrame(50)->GetAudioSamplesCount()); // Change mapping data map.ChangeMapping(Fraction(25,1), PULLDOWN_NONE, 22050, 1, LAYOUT_MONO); // Check details CHECK_EQUAL(1, map.GetFrame(1)->GetAudioChannelsCount()); - CHECK_EQUAL(871, map.GetFrame(1)->GetAudioSamplesCount()); - CHECK_EQUAL(881, map.GetFrame(2)->GetAudioSamplesCount()); - CHECK_EQUAL(881, map.GetFrame(50)->GetAudioSamplesCount()); + CHECK_EQUAL(872, map.GetFrame(1)->GetAudioSamplesCount()); + CHECK_EQUAL(882, map.GetFrame(2)->GetAudioSamplesCount()); + CHECK_EQUAL(882, map.GetFrame(50)->GetAudioSamplesCount()); // Close mapper map.Close();