am ad285430: Make stagefright a little less verbose. Fix heap corruption for real.
Merge commit 'ad28543022101d0b01845e3f53dcd57e524816ef' into eclair-mr2-plus-aosp * commit 'ad28543022101d0b01845e3f53dcd57e524816ef': Make stagefright a little less verbose. Fix heap corruption for real.
This commit is contained in:
@@ -86,7 +86,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
|
|||||||
LOGV("captureFrame");
|
LOGV("captureFrame");
|
||||||
|
|
||||||
if (mExtractor.get() == NULL) {
|
if (mExtractor.get() == NULL) {
|
||||||
LOGE("no extractor.");
|
LOGV("no extractor.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
LOGE("no video track found.");
|
LOGV("no video track found.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
|
|||||||
sp<MediaSource> source = mExtractor->getTrack(i);
|
sp<MediaSource> source = mExtractor->getTrack(i);
|
||||||
|
|
||||||
if (source.get() == NULL) {
|
if (source.get() == NULL) {
|
||||||
LOGE("unable to instantiate video track.");
|
LOGV("unable to instantiate video track.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
|
|||||||
NULL, OMXCodec::kPreferSoftwareCodecs);
|
NULL, OMXCodec::kPreferSoftwareCodecs);
|
||||||
|
|
||||||
if (decoder.get() == NULL) {
|
if (decoder.get() == NULL) {
|
||||||
LOGE("unable to instantiate video decoder.");
|
LOGV("unable to instantiate video decoder.");
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -157,13 +157,13 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
|
|||||||
if (err != OK) {
|
if (err != OK) {
|
||||||
CHECK_EQ(buffer, NULL);
|
CHECK_EQ(buffer, NULL);
|
||||||
|
|
||||||
LOGE("decoding frame failed.");
|
LOGV("decoding frame failed.");
|
||||||
decoder->stop();
|
decoder->stop();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGI("successfully decoded video frame.");
|
LOGV("successfully decoded video frame.");
|
||||||
|
|
||||||
meta = decoder->getFormat();
|
meta = decoder->getFormat();
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ sp<MediaExtractor> MediaExtractor::Create(
|
|||||||
}
|
}
|
||||||
|
|
||||||
mime = tmp.string();
|
mime = tmp.string();
|
||||||
LOGI("Autodetected media content as '%s' with confidence %.2f",
|
LOGV("Autodetected media content as '%s' with confidence %.2f",
|
||||||
mime, confidence);
|
mime, confidence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,6 @@ static status_t StatusFromOMXError(OMX_ERRORTYPE err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
status_t OMXNodeInstance::freeNode() {
|
status_t OMXNodeInstance::freeNode() {
|
||||||
Mutex::Autolock autoLock(mLock);
|
|
||||||
|
|
||||||
OMX_ERRORTYPE err = OMX_MasterFreeHandle(mHandle);
|
OMX_ERRORTYPE err = OMX_MasterFreeHandle(mHandle);
|
||||||
mHandle = NULL;
|
mHandle = NULL;
|
||||||
|
|
||||||
@@ -119,9 +117,8 @@ status_t OMXNodeInstance::freeNode() {
|
|||||||
mOwner->invalidateNodeID(mNodeID);
|
mOwner->invalidateNodeID(mNodeID);
|
||||||
mNodeID = NULL;
|
mNodeID = NULL;
|
||||||
|
|
||||||
LOGI("OMXNodeInstance going away.");
|
LOGV("OMXNodeInstance going away.");
|
||||||
mObserver.clear();
|
delete this;
|
||||||
// delete this; // leads to heap-corruption???
|
|
||||||
|
|
||||||
return StatusFromOMXError(err);
|
return StatusFromOMXError(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user