drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.56k stars 480 forks source link

Bug in Mp4Reader causes wrong skip offset #390

Closed ponyfleisch closed 4 years ago

ponyfleisch commented 5 years ago

The skip logic here does not handle the case here properly. An additional offset of 8 bytes is needed in this case. I suggest storing the header size in the Box object and using that to determine the offset.

Shall i submit a pull request?

drewnoakes commented 5 years ago

A PR would be great, thank you.

@payton you might be interested in this.

payton commented 5 years ago

As @drewnoakes said, a PR would be great. Great catch!

drewnoakes commented 5 years ago

@ponyfleisch is this something you'd be able to pick up?

drewnoakes commented 5 years ago

Please also verify whether this applies to QuickTime handling too.

drewnoakes commented 4 years ago

@ponyfleisch will you have a chance to look at this?

Regardless of whether you can make a PR or not, can you share a sample file that triggers this behaviour?

drewnoakes commented 4 years ago

This code has since been updated to:

https://github.com/drewnoakes/metadata-extractor/blob/b694a7ed5798249197b1a624b8d77f0d61fff256/Source/com/drew/imaging/mp4/Mp4Reader.java#L64-L69

@ponyfleisch please verify if this code fixes your issue.