am d932de9a: mediacodec: Don\'t crash if trying to open a codec that does not exist

* commit 'd932de9aff49d1d9f752ad479b42854d2557c881':
  mediacodec: Don't crash if trying to open a codec that does not exist
This commit is contained in:
Martin Storsjo
2012-08-07 11:46:46 -07:00
committed by Android Git Automerger

View File

@@ -96,7 +96,10 @@ status_t JMediaCodec::initCheck() const {
}
JMediaCodec::~JMediaCodec() {
mCodec->release();
if (mCodec != NULL) {
mCodec->release();
mCodec.clear();
}
JNIEnv *env = AndroidRuntime::getJNIEnv();