am 4da3769d: Merge "mediacodec: Don\'t crash if trying to open a codec that does not exist"

* commit '4da3769d30851f0b517a688a5c835715d7d0b0bf':
  mediacodec: Don't crash if trying to open a codec that does not exist
This commit is contained in:
Jean-Baptiste Queru
2012-08-13 09:48:24 -07:00
committed by Android Git Automerger

View File

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