mediacodec: Don't crash if trying to open a codec that does not exist
Change-Id: If75e3156517993629f50622a84a9ac573fced815
This commit is contained in:
committed by
Andreas Huber
parent
b529e4c9ca
commit
d932de9aff
@@ -96,7 +96,10 @@ status_t JMediaCodec::initCheck() const {
|
||||
}
|
||||
|
||||
JMediaCodec::~JMediaCodec() {
|
||||
mCodec->release();
|
||||
if (mCodec != NULL) {
|
||||
mCodec->release();
|
||||
mCodec.clear();
|
||||
}
|
||||
|
||||
JNIEnv *env = AndroidRuntime::getJNIEnv();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user