Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Merge "Some free chunk available notification is missing, which messe…
Browse files Browse the repository at this point in the history
…s 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"
  • Loading branch information
James Dong authored and Android (Google) Code Review committed Mar 22, 2010
2 parents dca8e1d + 3fd45f0 commit 947cd0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
5 changes: 5 additions & 0 deletions oscl/oscl/osclmemory/src/oscl_mem_mempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* -------------------------------------------------------------------
*/
#include "oscl_mem_mempool.h"
#include <utils/Log.h>


/**
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 947cd0b

Please sign in to comment.