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

Commit fe26fcb2 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am 1a155c35: am 72497b7c: am 8c02c891: Merge "SoftAVCDec: Exit gracefully when...

am 1a155c35: am 72497b7c: am 8c02c891: Merge "SoftAVCDec: Exit gracefully when memory allocation fails in the decoder"

* commit '1a155c35':
  SoftAVCDec: Exit gracefully when memory allocation fails in the decoder
parents 97bf902e 1a155c35
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -477,6 +477,9 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {


    if (NULL == mCodecCtx) {
    if (NULL == mCodecCtx) {
        if (OK != initDecoder()) {
        if (OK != initDecoder()) {
            ALOGE("Failed to initialize decoder");
            notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
            mSignalledError = true;
            return;
            return;
        }
        }
    }
    }
@@ -593,6 +596,14 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
                return;
                return;
            }
            }


            bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & 0xFF));
            if (allocationFailed) {
                ALOGE("Allocation failure in decoder");
                notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
                mSignalledError = true;
                return;
            }

            bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & 0xFF));
            bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & 0xFF));


            GETTIME(&mTimeEnd, NULL);
            GETTIME(&mTimeEnd, NULL);