Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad285430 authored by Andreas Huber's avatar Andreas Huber
Browse files

Make stagefright a little less verbose. Fix heap corruption for real.

parent e8472900
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
    LOGV("captureFrame");

    if (mExtractor.get() == NULL) {
        LOGE("no extractor.");
        LOGV("no extractor.");
        return NULL;
    }

@@ -104,7 +104,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
    }

    if (i == n) {
        LOGE("no video track found.");
        LOGV("no video track found.");
        return NULL;
    }

@@ -114,7 +114,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
    sp<MediaSource> source = mExtractor->getTrack(i);

    if (source.get() == NULL) {
        LOGE("unable to instantiate video track.");
        LOGV("unable to instantiate video track.");
        return NULL;
    }

@@ -126,7 +126,7 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
                NULL, OMXCodec::kPreferSoftwareCodecs);

    if (decoder.get() == NULL) {
        LOGE("unable to instantiate video decoder.");
        LOGV("unable to instantiate video decoder.");

        return NULL;
    }
@@ -157,13 +157,13 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() {
    if (err != OK) {
        CHECK_EQ(buffer, NULL);

        LOGE("decoding frame failed.");
        LOGV("decoding frame failed.");
        decoder->stop();

        return NULL;
    }

    LOGI("successfully decoded video frame.");
    LOGV("successfully decoded video frame.");

    meta = decoder->getFormat();

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ sp<MediaExtractor> MediaExtractor::Create(
        }

        mime = tmp.string();
        LOGI("Autodetected media content as '%s' with confidence %.2f",
        LOGV("Autodetected media content as '%s' with confidence %.2f",
             mime, confidence);
    }

+2 −5
Original line number Diff line number Diff line
@@ -107,8 +107,6 @@ static status_t StatusFromOMXError(OMX_ERRORTYPE err) {
}

status_t OMXNodeInstance::freeNode() {
    Mutex::Autolock autoLock(mLock);

    OMX_ERRORTYPE err = OMX_MasterFreeHandle(mHandle);
    mHandle = NULL;

@@ -119,9 +117,8 @@ status_t OMXNodeInstance::freeNode() {
    mOwner->invalidateNodeID(mNodeID);
    mNodeID = NULL;

    LOGI("OMXNodeInstance going away.");
    mObserver.clear();
    // delete this;  // leads to heap-corruption???
    LOGV("OMXNodeInstance going away.");
    delete this;

    return StatusFromOMXError(err);
}