bogru
bogru
Same issue here, on android, using last version available for gradle, at line: MovieBox moov = isoFile.getBoxes(MovieBox.class).get(0); Fatal Exception: java.lang.OutOfMemoryError at java.nio.ByteBuffer.allocate(ByteBuffer.java:56) at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:110) at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:107) at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:185) at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:161)...
For some cases, the requested memory size is specified, and seems huge: Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 895140620 byte allocation with 16777216 free bytes and 159MB until OOM...
I can replicate with the video from the OP on Samsung S3 and probably happens on other devices too, maybe all.
It seems that the following line was changed in `AbstractBox.parse` : `this.content = ChannelHelper.readFully(readableByteChannel, contentSize);` to `content = ByteBuffer.allocate(l2i(contentSize));` Second one is causing trouble.
Please ignore the comment above. Anyway, reverting the AbstractBox file to the variant present in version 1.1.1 solves the issue. Can you please investigate?
Here's one fork with a branch that fixes it on top of release 1.1.18, in case anyone needs it: https://github.com/bogru/mp4parser/tree/mp4parser-project-1.1.18-FixIssue139-OOM.
Same issue here. The dolphin is seen over the grid, but this error appears and then the dolphin is deleted.
The code used for test is: > ``` > File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC);//new File(RawRecordFilePath); > File reSampled = new File(path, "resampled_22050_16384val_ssrconly_00.raw"); > File beforeResampleFile = new File(path,"22050_16384val.raw"); > try {...