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

MediaCodec: getBufferAndFormat - trying to get buffer with bad index #1

Open
Mouadabdelghafouraitali opened this issue Mar 14, 2022 · 0 comments

Comments

@Mouadabdelghafouraitali

Hi, thank you for sharing your code with us, I'm trying to use it in order to grab video frames (frame by frame), I've tried using your video (sample.mp4) as well as using a video path (from my gallery), the app always crashes with :

2022-03-14 17:38:20.401 19555-19631/maa.abc E/MediaCodec: getBufferAndFormat - trying to get buffer with bad index (index=18446744073709551613 buffer_size=0)
    

    --------- beginning of crash
2022-03-14 17:38:20.402 19555-19631/maa.abc E/AndroidRuntime: FATAL EXCEPTION: Thread-4
    Process:maa.abc, PID: 19555
    java.lang.IllegalStateException
        at android.media.MediaCodec.getImage(Native Method)
        at android.media.MediaCodec.getOutputImage(MediaCodec.java:4018)
        at maa.abc.utils.video_graber.VideoToImages.run$lambda-1(VideoToImages.kt:114)
        at maa.abc.utils.video_graber.VideoToImages.$r8$lambda$KXbPNqoaAjjdVnSNfDEimndn7Ts(Unknown Source:0)
        at maa.abc.utils.video_graber.VideoToImages$$ExternalSyntheticLambda0.run(Unknown Source:4)
        at java.lang.Thread.run(Thread.java:923)

Thank you.

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

No branches or pull requests

1 participant