summaryrefslogtreecommitdiffstats
path: root/domx
diff options
context:
space:
mode:
authorSarthak Aggarwal <sarthak@ti.com>2011-09-22 11:04:12 +0530
committerIliyan Malchev <malchev@google.com>2011-09-22 11:33:59 -0700
commit0a866629f2245a112033476c2f2a29cbb353fd73 (patch)
tree0078df0bc67cb87c2b2b0ed55d30dda6942451a1 /domx
parent0e2a9f1fabc12a1a1123f8374d0e4d6faf5a2d62 (diff)
downloadhardware_ti_omap4xxx-0a866629f2245a112033476c2f2a29cbb353fd73.zip
hardware_ti_omap4xxx-0a866629f2245a112033476c2f2a29cbb353fd73.tar.gz
hardware_ti_omap4xxx-0a866629f2245a112033476c2f2a29cbb353fd73.tar.bz2
H264 enc: Dont encode buffer with filled len zero.
Fixes b/5332812 Even in case filled len sent by client was 0, proxy was overriding it with a non-zero value leading ducati side to encode it. this patch rectifies that. Change-Id: Ia1125fad0fe61ccb4375192f962a2da60202a275 Signed-off-by: Sarthak Aggarwal <sarthak@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'domx')
-rw-r--r--domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c b/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c
index d2eb2a9..21eab68 100644
--- a/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c
+++ b/domx/omx_proxy_component/omx_h264_enc/src/omx_proxy_h264enc.c
@@ -582,7 +582,10 @@ OMX_ERRORTYPE LOCAL_PROXY_H264E_EmptyThisBuffer(OMX_HANDLETYPE hComponent,
PROXY_require(eError == OMX_ErrorNone, OMX_ErrorBadParameter, "Error is Get Parameter for port def");
nFilledLen = pBufferHdr->nFilledLen;
nAllocLen = pBufferHdr->nAllocLen;
- pBufferHdr->nFilledLen = tParamStruct.nBufferSize;
+ if(nFilledLen != 0)
+ {
+ pBufferHdr->nFilledLen = tParamStruct.nBufferSize;
+ }
pBufferHdr->nAllocLen = tParamStruct.nBufferSize;
DOMX_DEBUG
@@ -590,7 +593,7 @@ OMX_ERRORTYPE LOCAL_PROXY_H264E_EmptyThisBuffer(OMX_HANDLETYPE hComponent,
__FUNCTION__,hComponent, pCompPrv, pBufferHdr->nFilledLen,
pBufferHdr->nOffset, pBufferHdr->nFlags);
- if( pCompPrv->proxyPortBuffers[OMX_H264E_INPUT_PORT].proxyBufferType == EncoderMetadataPointers)
+ if( pCompPrv->proxyPortBuffers[OMX_H264E_INPUT_PORT].proxyBufferType == EncoderMetadataPointers && nFilledLen != 0 )
{
OMX_U32 *pTempBuffer;
OMX_U32 nMetadataBufferType;