Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iTunes produced small file fails with Reconstructed Size is not equal to the number of parsed bytes!"" #30

Closed
GoogleCodeExporter opened this issue Jul 12, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I'm trying to use mp4parser to implement a MP4 parser for Apache Tika

As part of that, I've created a small test M4A MP4 audio file using iTunes, 
which is based on a very short wav file and some test metadata. The test file 
is only 5kb large, and is available from 
http://svn.apache.org/repos/asf/tika/trunk/tika-parsers/src/test/resources/test-
documents/testMP4.m4a

When trying to load this file in mp4parser when asserts are enabled (such as in 
the Tika test suite), the parser blows up with:

Reconstructed Size is not equal to the number of parsed bytes! (hdlr) Actual 
Box size: 34 Calculated size: 36 at offset: 617

Looking at a hex dump of the file, the size is 0x22, and that looks correct to 
me as at 0x028b we have 00 00 03 a6 ilst, which appears to be a 0x03a6 long 
ilst box:

00000260  fb 6d 65 74 61 00 00 00  00 00 00 00 22 68 64 6c  |.meta......."hdl|
00000270  72 00 00 00 00 00 00 00  00 6d 64 69 72 61 70 70  |r........mdirapp|
00000280  6c 00 00 00 00 00 00 00  00 00 cc 00 00 03 a6 69  |l..............i|
00000290  6c 73 74 00 00 00 22 a9  6e 61 6d 00 00 00 1a 64  |lst...".nam....d|


The file was created with iTunes (which has no problems with it), and both 
mplayer and ffmpeg are happy with it too, so this looks like a mp4parser bug

Original issue reported on code.google.com by n...@apache.org on 28 Jan 2012 at 9:12

@GoogleCodeExporter
Copy link
Author

attached a patch to https://issues.apache.org/jira/browse/TIKA-852

Original comment by Sebastian.Annies on 31 Mar 2012 at 3:51

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant