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

Cast ByteBuffer to Buffer #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ryohey
Copy link

@ryohey ryohey commented Aug 13, 2020

Thank you for your great library. It works great on Android 10 but we found the problem on Android 8 and 9. I got the following error.

Fatal Exception: java.lang.NoSuchMethodError: No virtual method limit(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar)
       at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:84)
       at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107)
       at org.mp4parser.IsoFile.<init>(IsoFile.java:57)
       at org.mp4parser.IsoFile.<init>(IsoFile.java:52)
       at org.mp4parser.muxer.container.mp4.MovieCreator.build(MovieCreator.java:54)
       at org.mp4parser.muxer.container.mp4.MovieCreator.build(MovieCreator.java:39)

This seems to be the same problem that fixed in this commit. 0fdd054
I added codes that cast ByteBuffer to Buffer then the problem solved at least on my devices (SC-02H).

Fix:
Fatal Exception: java.lang.NoSuchMethodError: No virtual method limit(I)Ljava/nio/ByteBuffer; in class Ljava/nio/ByteBuffer; or its super classes (declaration of 'java.nio.ByteBuffer' appears in /system/framework/core-oj.jar)
shohara added a commit to Infomorph-Inc/mp4parser that referenced this pull request Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant