MasayukiSuda / GPUVideo-android

This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
MIT License
658 stars 179 forks source link

Random crash /Fatal Exception: java.lang.Error: Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline.' #102

Open khawarraza opened 2 years ago

khawarraza commented 2 years ago

I am getting random crash in my app due to error thrown by GPUMp4ComposerEngine. Here are the crash logs.

Fatal Exception: java.lang.Error: Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline.
       at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.compose(GPUMp4ComposerEngine.java:138)
       at com.daasuu.gpuv.composer.GPUMp4Composer$1.run(GPUMp4Composer.java:188)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

Caused by java.lang.IllegalStateException
       at android.media.MediaCodec.native_stop(MediaCodec.java)
       at android.media.MediaCodec.stop(MediaCodec.java:2300)
       at com.daasuu.gpuv.composer.VideoComposer.release(VideoComposer.java:143)
       at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.compose(GPUMp4ComposerEngine.java:124)
       at com.daasuu.gpuv.composer.GPUMp4Composer$1.run(GPUMp4Composer.java:188)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)

I am trying to catch the error but unable to do so.

neerajrcodiant commented 1 year ago

Have you solve this issue?

khawarraza commented 1 year ago

Nope, not yet.

RNSolutionKhan commented 1 year ago

Exception java.lang.Error: Could not shutdown mediaExtractor, codecs and mediaMuxer pipeline. at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.compose (GPUMp4ComposerEngine.java:138) at com.daasuu.gpuv.composer.GPUMp4Composer$1.run (GPUMp4Composer.java:188) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641) at java.lang.Thread.run (Thread.java:923) Caused by java.lang.IllegalStateException: at android.media.MediaCodec.native_stop at android.media.MediaCodec.stop (MediaCodec.java:2251) at com.daasuu.gpuv.composer.VideoComposer.release (VideoComposer.java:143) at com.daasuu.gpuv.composer.GPUMp4ComposerEngine.compose (GPUMp4ComposerEngine.java:124)

Same issue