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

Commit f36fb2de authored by Venkatarama Avadhani's avatar Venkatarama Avadhani Committed by android-build-merger
Browse files

Change MPEG2 reinit Error Handling am: a67eacac am: a16f5a1f am: 1c0389cc am: 4ff3666a

am: b56bc9e7

Change-Id: Id27edb4426a7c4c2fad7bac2582663667d58ad75
parents 036d7252 b56bc9e7
Loading
Loading
Loading
Loading
+9 −14
Original line number Diff line number Diff line
@@ -83,13 +83,6 @@ SoftMPEG2::SoftMPEG2(
    // If input dump is enabled, then open create an empty file
    GENERATE_FILE_NAMES();
    CREATE_DUMP_FILE(mInFile);

    if (OK != initDecoder()) {
        ALOGE("Failed to initialize decoder");
        notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
        mSignalledError = true;
        return;
    }
}

SoftMPEG2::~SoftMPEG2() {
@@ -460,8 +453,6 @@ status_t SoftMPEG2::reInitDecoder() {
    if (OK != ret) {
        ALOGE("Failed to initialize decoder");
        deInitDecoder();
        notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
        mSignalledError = true;
        return ret;
    }
    mSignalledError = false;
@@ -610,6 +601,15 @@ void SoftMPEG2::onQueueFilled(OMX_U32 portIndex) {
        return;
    }

    if (NULL == mCodecCtx) {
        if (OK != initDecoder()) {
            ALOGE("Failed to initialize decoder");
            notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
            mSignalledError = true;
            return;
        }
    }

    List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
    List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);

@@ -664,9 +664,6 @@ void SoftMPEG2::onQueueFilled(OMX_U32 portIndex) {

            if (OK != reInitDecoder()) {
                ALOGE("Failed to reinitialize decoder");
                notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
                mSignalledError = true;
                return;
            }
            return;
        }
@@ -742,8 +739,6 @@ void SoftMPEG2::onQueueFilled(OMX_U32 portIndex) {

                if (OK != reInitDecoder()) {
                    ALOGE("Failed to reinitialize decoder");
                    notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
                    mSignalledError = true;
                    return;
                }