aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-03-20 23:58:50 -0700
committerJames Dong <jdong@google.com>2010-03-22 10:02:00 -0700
commit3fd45f039dfb018b00964736e63cbae7b354a07c (patch)
tree8cd4667012878d9c5d5601b6a81bb98af5408916
parent066ead975c10e3e7e4a9ce4743bde86c7500226f (diff)
downloadopencore-3fd45f039dfb018b00964736e63cbae7b354a07c.tar.gz
Some free chunk available notification is missing, which messes up the number of outstanding output buffer count.
As a result, the media server either hangs if omx encoder node thinks it is still waiting for some buffers to be returned from the omx component, or silently crashes if the omx encoder node frees the buffer prematurely bug - 2484098 Change-Id: Ic928a29ad1365c31b93f8a51942b4cf85445bd5d
-rw-r--r--nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp2
-rw-r--r--oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp5
2 files changed, 7 insertions, 0 deletions
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
index a0bf09cb5..61aa7b082 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
@@ -1206,6 +1206,8 @@ void PVMFOMXEncNode::Run()
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
(0, "PVMFOMXEncNode-%s::Run(): Flush pending: Changing Component State Executing->Idle or Pause->Idle", iNodeTypeId));
+ if (iOutPort) iOutPort->ClearMsgQueues();
+
err = OMX_SendCommand(iOMXEncoder, OMX_CommandStateSet, OMX_StateIdle, NULL);
if (err != OMX_ErrorNone)
{
diff --git a/oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp b/oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp
index efea04814..b86769cb8 100644
--- a/oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp
+++ b/oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp
@@ -16,6 +16,7 @@
* -------------------------------------------------------------------
*/
#include "oscl_mem_mempool.h"
+#include <utils/Log.h>
/**
@@ -154,6 +155,10 @@ OSCL_EXPORT_REF void OsclMemPoolFixedChunkAllocator::deallocate(OsclAny* p)
iObserver->freechunkavailable(iNextAvailableContextData);
}
}
+ else if (iObserver && iCheckNextAvailableFreeChunk)
+ {
+ LOGW("We may have lost some free chunk %p available notification for memory pool %p with chunk size %d", ptmp, mptmp, iChunkSizeMemAligned);
+ }
// Decrement the refcount since deallocating succeeded
removeRef();