aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianhong Jiang <jianhong@google.com>2009-10-29 18:01:18 -0700
committerJames Dong <jdong@google.com>2009-11-02 13:49:43 -0800
commit2481a6567e626133c1b52e0ebd2bb68f85e2af98 (patch)
treed3b81bd51e33fcaa83b39686926c6ddb06f3f134
parent52da2441fc61995154c09f07cd31b3902842f2fa (diff)
downloadopencore-2481a6567e626133c1b52e0ebd2bb68f85e2af98.tar.gz
DO NOT MERGE TO MR2
There is a crash due to OMX_UseBuffer change. In Reset(), media input node deletes the media input node port, which deletes the allocator. When encoder node releases the media data, it calls the allocator to release the memory. That causes crash. Cherry-picked from MR2 branch. commit af748e6c031c733e2737a7ea4affbc082e92dca2 Author: Jianhong Jiang <jianhong@google.com> Date: Fri Oct 23 14:41:57 2009 -0700 RIO-7762: OMX_UseBuffer support buffers allocated in MIO. The change depends on https://android-git.corp.google.com/g/30984
-rw-r--r--nodes/pvmediainputnode/src/pvmf_media_input_node.h2
-rw-r--r--nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp4
-rw-r--r--nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h1
3 files changed, 4 insertions, 3 deletions
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node.h b/nodes/pvmediainputnode/src/pvmf_media_input_node.h
index d7731ef4c..6fc697140 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node.h
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node.h
@@ -331,6 +331,8 @@ class PvmfMediaInputNode : public OsclActiveObject,
} TimeStamp_KSV;
TimeStamp_KSV iErrorTimeStamp;
#endif
+
+ PVMFBufferPoolAllocator iPrivateDataFsiFragmentAlloc;
};
#endif // PVMF_MEDIA_INPUT_NODE_H_INCLUDED
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
index 2ac093cbe..118cd2fed 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.cpp
@@ -66,7 +66,7 @@ PvmfMediaInputNodeOutPort::PvmfMediaInputNodeOutPort(PvmfMediaInputNode* aNode,
iMediaDataAlloc = OSCL_NEW(PvmfMediaInputDataBufferAlloc, (iMediaDataAllocMemPool));
iDataPathLogger = PVLogger::GetLoggerObject("datapath.sourcenode");
- iPrivateDataFsiFragmentAlloc.size(32, sizeof(OsclAny *)); //TODO REMOVE THE HARDCODED VALUE
+ iNode->iPrivateDataFsiFragmentAlloc.size(32, sizeof(OsclAny *)); //TODO REMOVE THE HARDCODED VALUE
#ifdef _TEST_AE_EROR_HANDLING
iTimeStampJunk = 0x000FFFFF;
#endif
@@ -412,7 +412,7 @@ PVMFCommandId PvmfMediaInputNodeOutPort::writeAsync(uint8 format_type, int32 for
OsclRefCounterMemFrag privatedataFsiMemFrag;
OsclLeaveCode fsiErrorCode = OsclErrNone;
- OSCL_TRY(fsiErrorCode, privatedataFsiMemFrag = iPrivateDataFsiFragmentAlloc.get(););
+ OSCL_TRY(fsiErrorCode, privatedataFsiMemFrag = iNode->iPrivateDataFsiFragmentAlloc.get(););
OSCL_FIRST_CATCH_ANY(fsiErrorCode,
LOG_ERR((0, "Failed to allocate memory for FSI for private data"));
diff --git a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
index 3cff6913a..c198fce8f 100644
--- a/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
+++ b/nodes/pvmediainputnode/src/pvmf_media_input_node_outport.h
@@ -185,7 +185,6 @@ class PvmfMediaInputNodeOutPort : public OsclTimerObject,
//logging
OSCL_HeapString<OsclMemAllocator> iMimeType;
PVLogger* iDataPathLogger;
- PVMFBufferPoolAllocator iPrivateDataFsiFragmentAlloc;
};
#endif // PVMF_MEDIA_INPUT_NODE_INPORT_H_INCLUDED