diff options
author | Tsuda Kageyu <tsuda.kageyu@gmail.com> | 2015-12-22 17:06:40 +0900 |
---|---|---|
committer | Tsuda Kageyu <tsuda.kageyu@gmail.com> | 2015-12-22 17:06:40 +0900 |
commit | 22708a0af6d0b680a419f993c1c6da71e2ebc9a4 (patch) | |
tree | ceff305130051a19267d8d58ba820902022b427f /tests/test_mpeg.cpp | |
parent | 12da0ebd6d064e78df28690b6e08940fb2614b1a (diff) |
Add some supplementary comments.
Diffstat (limited to 'tests/test_mpeg.cpp')
-rw-r--r-- | tests/test_mpeg.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_mpeg.cpp b/tests/test_mpeg.cpp index 9b972382..455fde2c 100644 --- a/tests/test_mpeg.cpp +++ b/tests/test_mpeg.cpp @@ -93,10 +93,13 @@ public: CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate()); CPPUNIT_ASSERT(!f.audioProperties()->xingHeader()); + // This actually finds the second last valid frame, since MPEG::Header requires + // the next frame header to check if the frame length is calculated correctly. + long last = f.lastFrameOffset(); MPEG::Header lastHeader(&f, last); - while (!lastHeader.isValid()) { + while(!lastHeader.isValid()) { last = f.previousFrameOffset(last); lastHeader = MPEG::Header(&f, last); } |