diff options
author | James Dong <jdong@google.com> | 2010-04-07 12:55:43 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-04-07 15:47:03 -0700 |
commit | 2ad894174d9c4b5025abc04321fb051284a228de (patch) | |
tree | e9b32b8f98832245166b329411e731ac2e22e032 | |
parent | 325eeae93341ab2dc2a2b2657b9914212d3decc9 (diff) | |
download | omap3-2ad894174d9c4b5025abc04321fb051284a228de.tar.gz |
Don't invalidate the memory pointed by the arm argument pointer,
if the arm argument pointer is NULL or the size of the memory that it
points to is 0.
This avoids some logging spam, which happens very frequently
with JPEG encoder and WMV decoder.
Change-Id: I00b4adea27466fa56a65ccb795299f61f0e0bc8f
-rw-r--r-- | omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c b/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c index 7a25564..c74082a 100644 --- a/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c +++ b/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c @@ -1853,13 +1853,21 @@ void* MessagingThread(void* arg) { char *tmp2 = NULL; - status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, tmpDspStructAddress, sizeof(TArmDspCommunicationStruct)); - if(DSP_FAILED(status)) + status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, + tmpDspStructAddress, sizeof(TArmDspCommunicationStruct)); + if (DSP_FAILED(status)) { LOGE("Invalidate for communication structure failed. status = 0x%x\n", status); + } - status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, tmpDspStructAddress->iArmParamArg, tmpDspStructAddress->iParamSize); - if(DSP_FAILED(status)) - LOGE("Invalidate for arm parameter arguments failed. status = 0x%x\n", status); + // Only invalidate the memory when the pointer points to some valid memory region + // otherwise, we will get logging spam + if (tmpDspStructAddress->iArmParamArg != NULL && tmpDspStructAddress->iParamSize > 0) { + status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, + tmpDspStructAddress->iArmParamArg, tmpDspStructAddress->iParamSize); + if (DSP_FAILED(status)) { + LOGE("Invalidate for arm parameter arguments failed. status = 0x%x\n", status); + } + } event = EMMCodecBufferProcessed; args[0] = (void *) bufType; |