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

Commit b6a6b232 authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by android-build-merger
Browse files

SoftHevcDec: notify error for fatal errors in decoder

am: 983e8ca3

Change-Id: I0f6e9fca0ccd55b56421c59cc7fd67ccfe790011
parents 025d0080 983e8ca3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ void SoftHEVC::onQueueFilled(OMX_U32 portIndex) {
            status = ivdec_api_function(mCodecCtx, (void *)&s_dec_ip, (void *)&s_dec_op);

            bool unsupportedResolution =
                (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & 0xFF));
                (IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED == (s_dec_op.u4_error_code & IVD_ERROR_MASK));

            /* Check for unsupported dimensions */
            if (unsupportedResolution) {
@@ -579,7 +579,8 @@ void SoftHEVC::onQueueFilled(OMX_U32 portIndex) {
                return;
            }

            bool allocationFailed = (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & 0xFF));
            bool allocationFailed = 
                (IVD_MEM_ALLOC_FAILED == (s_dec_op.u4_error_code & IVD_ERROR_MASK));
            if (allocationFailed) {
                ALOGE("Allocation failure in decoder");
                notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
@@ -587,7 +588,14 @@ void SoftHEVC::onQueueFilled(OMX_U32 portIndex) {
                return;
            }

            bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & 0xFF));
            if (IS_IVD_FATAL_ERROR(s_dec_op.u4_error_code)) {
                ALOGE("Fatal Error : 0x%x", s_dec_op.u4_error_code);
                notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL);
                mSignalledError = true;
                return;
            }

            bool resChanged = (IVD_RES_CHANGED == (s_dec_op.u4_error_code & IVD_ERROR_MASK));

            getVUIParams();