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

Commit bb3e9ebc authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am 7c063cf9: Merge "There\'s no point in trying to continue to decode after an...

am 7c063cf9: Merge "There\'s no point in trying to continue to decode after an error was signalled." into ics-mr1

* commit '7c063cf9679a2ecdda5e1639cfdca3e1084019f9':
  There's no point in trying to continue to decode after an error was signalled.
parents 0ac360ef d57a4ddd
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -76,7 +76,8 @@ SoftAVC::SoftAVC(
      mPicId(0),
      mHeadersDecoded(false),
      mEOSStatus(INPUT_DATA_AVAILABLE),
      mOutputPortSettingsChange(NONE) {
      mOutputPortSettingsChange(NONE),
      mSignalledError(false) {
    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
@@ -287,7 +288,7 @@ OMX_ERRORTYPE SoftAVC::getConfig(
}

void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
    if (mOutputPortSettingsChange != NONE) {
    if (mSignalledError || mOutputPortSettingsChange != NONE) {
        return;
    }

@@ -298,7 +299,6 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
    List<BufferInfo *> &inQueue = getPortQueue(kInputPortIndex);
    List<BufferInfo *> &outQueue = getPortQueue(kOutputPortIndex);
    H264SwDecRet ret = H264SWDEC_PIC_RDY;
    status_t err = OK;
    bool portSettingsChanged = false;
    while ((mEOSStatus != INPUT_DATA_AVAILABLE || !inQueue.empty())
            && outQueue.size() == kNumOutputBuffers) {
@@ -372,7 +372,12 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
                inPicture.dataLen = 0;
                if (ret < 0) {
                    LOGE("Decoder failed: %d", ret);
                    err = ERROR_MALFORMED;

                    notify(OMX_EventError, OMX_ErrorUndefined,
                           ERROR_MALFORMED, NULL);

                    mSignalledError = true;
                    return;
                }
            }
        }
@@ -400,10 +405,6 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
            uint8_t *data = (uint8_t *) decodedPicture.pOutputPicture;
            drainOneOutputBuffer(picId, data);
        }

        if (err != OK) {
            notify(OMX_EventError, OMX_ErrorUndefined, err, NULL);
        }
    }
}

+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ private:
    };
    OutputPortSettingChange mOutputPortSettingsChange;

    bool mSignalledError;

    void initPorts();
    status_t initDecoder();
    void updatePortDefinitions();