diff options
| author | Dan Liang <dan.liang@intel.com> | 2013-06-28 21:48:38 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:52 -0700 |
| commit | 2f62d421d6a8c44d260c1442acf316957eaf7aa3 (patch) | |
| tree | 99dda404bf3263ada3e5000d570b5da2198c99e5 /videocodec/OMXVideoDecoderBase.cpp | |
| parent | fd26403f7320f4d298493acc6edf3e60151022c6 (diff) | |
| download | android_hardware_intel_common_omx-components-2f62d421d6a8c44d260c1442acf316957eaf7aa3.tar.gz android_hardware_intel_common_omx-components-2f62d421d6a8c44d260c1442acf316957eaf7aa3.tar.bz2 android_hardware_intel_common_omx-components-2f62d421d6a8c44d260c1442acf316957eaf7aa3.zip | |
Add one condition check to avoid unnecessary wait in ProcessorReset
BZ: 119065
When VideoEditor exports movies, it doesn't allocate output port buffers from
Graphics. In case it needs to reallocate buffers, it won't wait for the
invalid condition which is only signaled when working mode is GRAPHICBUFFER_MODE.
Change-Id: I1faca9b8bd0cef7cb0dedb87d059bbb3c5656ce8
Signed-off-by: Dan Liang <dan.liang@intel.com>
Reviewed-on: http://android.intel.com:8080/116120
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Gu, Wangyi <wangyi.gu@intel.com>
Reviewed-by: Feng, Wei <wei.feng@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderBase.cpp')
| -rwxr-xr-x | videocodec/OMXVideoDecoderBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp index 71787d4..18915e8 100755 --- a/videocodec/OMXVideoDecoderBase.cpp +++ b/videocodec/OMXVideoDecoderBase.cpp @@ -204,13 +204,13 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorReset(void) { OMX_ERRORTYPE ret; VideoConfigBuffer configBuffer; pthread_mutex_lock(&mOMXBufferArray_lock); - if (!mSetNativeBuffer_completion) + if (mWorkingMode == GRAPHICBUFFER_MODE && !mSetNativeBuffer_completion) pthread_cond_wait(&mOMXBufferArray_cond, &mOMXBufferArray_lock); // reset the configbuffer and set it to mix ret = PrepareConfigBuffer(&configBuffer); + pthread_mutex_unlock(&mOMXBufferArray_lock); CHECK_RETURN_VALUE("PrepareConfigBuffer"); mVideoDecoder->reset(&configBuffer); - pthread_mutex_unlock(&mOMXBufferArray_lock); return OMX_ErrorNone; } |
