summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-04-07 12:55:43 -0700
committerJames Dong <jdong@google.com>2010-04-07 15:47:03 -0700
commit2ad894174d9c4b5025abc04321fb051284a228de (patch)
treee9b32b8f98832245166b329411e731ac2e22e032
parent325eeae93341ab2dc2a2b2657b9914212d3decc9 (diff)
downloadomap3-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.c18
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;