diff options
author | Jessica Wagantall <jwagantall@cyngn.com> | 2016-08-02 11:02:17 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-08-02 11:37:41 -0700 |
commit | aa98968601ddb19d92790bf76bddd351dbc4c640 (patch) | |
tree | 465e1907f96ee6a67504dada03cff5c2a3326b01 /media/libstagefright/codecs/hevcdec/SoftHEVC.cpp | |
parent | a5ec3545f879e882ed5397707f65a4757f7232d5 (diff) | |
parent | 1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc (diff) | |
download | frameworks_av-aa98968601ddb19d92790bf76bddd351dbc4c640.zip frameworks_av-aa98968601ddb19d92790bf76bddd351dbc4c640.tar.gz frameworks_av-aa98968601ddb19d92790bf76bddd351dbc4c640.tar.bz2 |
Merge tag 'android-6.0.1_r61' into HEAD
Android 6.0.1 Release 61 (MOB30Z)
Change-Id: Ic86e42d5fb8f81fe5c4f58d2e76852829c609760
Diffstat (limited to 'media/libstagefright/codecs/hevcdec/SoftHEVC.cpp')
-rw-r--r-- | media/libstagefright/codecs/hevcdec/SoftHEVC.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp index a70755c..1dac868 100644 --- a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp +++ b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp @@ -444,6 +444,9 @@ void SoftHEVC::onQueueFilled(OMX_U32 portIndex) { if (NULL == mCodecCtx) { if (OK != initDecoder()) { + ALOGE("Failed to initialize decoder"); + notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); + mSignalledError = true; return; } } @@ -540,6 +543,25 @@ void SoftHEVC::onQueueFilled(OMX_U32 portIndex) { IV_API_CALL_STATUS_T status; 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)); + + /* Check for unsupported dimensions */ + if (unsupportedResolution) { + ALOGE("Unsupported resolution : %dx%d", mWidth, mHeight); + notify(OMX_EventError, OMX_ErrorUnsupportedSetting, 0, NULL); + mSignalledError = true; + 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)); GETTIME(&mTimeEnd, NULL); |