Possible bug in MPEG::File::strip
hyperquantum at gmail.com
Tue Sep 13 15:57:48 UTC 2016
I think I found a problem in MPEG::File::strip, and I managed to
reproduce it with a new unit test (see patch attached).
What the test does:
1) read the test MP3 file completely into a ByteVector
2) copy the ByteVector into a new one, and call strip() on that
3) copy the original ByteVector into another one, add some tags and
4) copy the result from (3) into a new ByteVector, and call strip() on it
5) check if the resulting ByteVectors from (2) and (4) have the same length
But the test fails...
1: Test name: TestMPEG::testStripAndFileLength
1: equality assertion failed
1: - Expected: 8208
1: - Actual : 8336
The result of (4) is exactly 128 bytes larger than the result of (2).
And that is the size of an ID3v1 tag. So, is there something wrong
with the strip() method? Or did I miss something?
I looked at the implementation of the strip() method but couldn't
really find anything that might cause this. And both calls to strip()
seem to return true, though I did not include the checks for that in
the patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2297 bytes
Desc: not available
More information about the taglib-devel