AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
518 stars 117 forks source link

video compression not supporting for android version 11 #85

Closed shivanitt closed 3 years ago

shivanitt commented 3 years ago

the same code is working fine in android 10 but when I'm running the app in the android version 11 the app has been crashed

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.appcraft.salesforce, PID: 10218 java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA at android.media.MediaMetadataRetriever._setDataSource(Native Method) at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:272) at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:238) at com.abedelazizshe.lightcompressorlibrary.Compressor.compressVideo(Compressor.kt:84) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(VideoCompressor.kt:112) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

AbedElazizShe commented 3 years ago

@shivanitt Thank you for opening this issue. Have you tried the sample apk? Please let me know if this issue persists. Thank you.

AbedElazizShe commented 3 years ago

Duplicated issue #82