-
Notifications
You must be signed in to change notification settings - Fork 589
Open
Description
We’re encountering a native crash while using DJI Mobile SDK together with Android’s MediaCodec API for video decoding. The crash occurs inside libmedia_jni.so during the callback handling.
Backtrace:
#06 pc ... /system/lib64/libmedia_jni.so (android::JMediaCodec::handleCallback(android::sp<android::AMessage> const&)+524)
#04 pc ... /apex/com.android.art/lib64/libart.so (art::JNI<false>::FindClass+696)
#00 pc ... /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
...
It looks like a FindClass call from native code is failing during a MediaCodec callback, which causes an abort in ART runtime.
Steps:
- We are using MediaCodec.setCallback(...) with a custom HandlerThread.
- The crash occurs intermittently during video playback/streaming via DJI SDK.
Questions:
1. Is DJI SDK internally using MediaCodec or handling JMediaCodec callbacks that may conflict with app-level MediaCodec usage?
2. Are there known limitations or conflicts when using MediaCodec callbacks in background threads?
3. What’s the recommended way to safely integrate custom MediaCodec usage alongside DJI’s video pipeline?
We appreciate any suggestions or guidance to prevent this crash.
Metadata
Metadata
Assignees
Labels
No labels