dhamaniasad / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
2 stars 1 forks source link

MP4: container with 64-bit size containing zero should extend to end of file #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When a container has a '1' in the length field, indicating it has a 64-bit atom 
size, but then the atom size is set to zero, it should be treated as if there 
was a zero in the length field.

I'm not sure this is completely valid, as the sample file I found with this 
issue could not be read by either iTunes, Rhythmbox or VLC (because it only had 
an mdat container but no moov container). Perhaps this should raise an 
exception right away instead.

The failure to handle this case causes a problem similar to Issue #109, as the 
atom length gets set to zero and mutagen keeps looping back to the same 
position on the file until a MemoryError happens.

Patch attached with test for the new behavior.

Original issue reported on code.google.com by sidnei.d...@gmail.com on 3 Jan 2013 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d3d0f5b668d7.

Original comment by reiter.christoph@gmail.com on 4 Sep 2013 at 2:00

GoogleCodeExporter commented 9 years ago
Sorry for the delay.

I went with the exception since I don't think they added magic values to two 
fields without really needing it.

If you find such a file which loads in iTunes, please report it.

Thanks!

Original comment by reiter.christoph@gmail.com on 4 Sep 2013 at 2:04