summaryrefslogtreecommitdiff
path: root/omx
diff options
context:
space:
mode:
authorMasaki Sato <masaki.sato@motorola.com>2009-08-27 17:21:01 -0500
committerJames Dong <jdong@google.com>2009-08-31 22:59:12 -0700
commit3f62be3a6bf3980f27cee0c049b5c9e017d67c4a (patch)
tree5200230b69d8e7a39d76c8b2770e4d869118bf0b /omx
parent341ee0b938bf39c8e2d94e9aa060428c03b597f7 (diff)
downloadomap3-3f62be3a6bf3980f27cee0c049b5c9e017d67c4a.tar.gz
Added extra check which marks the last output buffer queued at lcml with the EOS to be propogated to PV.
Originally from https://partner.source.android.com/g/#change,860 Appears other OMX decoder components have similar issues Thus, more fixes are expected to be coming soon.
Diffstat (limited to 'omx')
-rw-r--r--omx/audio/src/openmax_il/wma_dec/src/OMX_WmaDec_Utils.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/omx/audio/src/openmax_il/wma_dec/src/OMX_WmaDec_Utils.c b/omx/audio/src/openmax_il/wma_dec/src/OMX_WmaDec_Utils.c
index 6e89769..6f57378 100644
--- a/omx/audio/src/openmax_il/wma_dec/src/OMX_WmaDec_Utils.c
+++ b/omx/audio/src/openmax_il/wma_dec/src/OMX_WmaDec_Utils.c
@@ -1941,7 +1941,7 @@ OMX_ERRORTYPE WMADECLCML_Callback (TUsnCodecEvent event,void * args [10])
LCML_WMADEC_BUFHEADERTYPE *pLcmlHdr;
WMADEC_COMPONENT_PRIVATE *pComponentPrivate_CC = NULL;
OMX_COMPONENTTYPE *pHandle = NULL;
-
+ OMX_U8 pending_buffers = OMX_FALSE;
#ifdef WMADEC_DEBUG
LCML_DSP_INTERFACE *phandle;
#endif
@@ -2288,6 +2288,7 @@ OMX_ERRORTYPE WMADECLCML_Callback (TUsnCodecEvent event,void * args [10])
{
OMX_PRDSP2(pComponentPrivate_CC->dbg, "%d :: GOT MESSAGE IUALG_WARN_PLAYCOMPLETED\n",
__LINE__);
+
for (i=0; i < pComponentPrivate_CC->pOutputBufferList->numBuffers; i++) {
if (WMADEC_IsPending(pComponentPrivate_CC,pComponentPrivate_CC->pOutputBufferList->pBufHdr[i],OMX_DirOutput)) {
pComponentPrivate_CC->lastout = pComponentPrivate_CC->pOutputBufferList->pBufHdr[i];
@@ -2309,14 +2310,24 @@ OMX_ERRORTYPE WMADECLCML_Callback (TUsnCodecEvent event,void * args [10])
pComponentPrivate_CC->pHandle->pApplicationPrivate,
pComponentPrivate_CC->pOutputBufferList->pBufHdr[i]);
pComponentPrivate_CC->nOutStandingFillDones++;
+ pending_buffers = OMX_TRUE;
+ }else{
+ if((i == pComponentPrivate_CC->pOutputBufferList->numBuffers-1) && !pending_buffers){
+ /*is last iteration and no pending buffers were found*/
+ pending_buffers = OMX_FALSE;
+ }
}
-
}
- if(pComponentPrivate_CC->dasfmode == 0)
+ if(!pComponentPrivate_CC->dasfmode)
{
- pComponentPrivate_CC->LastOutputBufferHdrQueued->nFlags |=
- OMX_BUFFERFLAG_EOS;
-
+ if(!pending_buffers){
+ /*turning on EOS on last buffer queued (extra check)*/
+ pComponentPrivate_CC->LastOutputBufferHdrQueued->nFlags |=
+ OMX_BUFFERFLAG_EOS;
+ pComponentPrivate_CC->cbInfo.FillBufferDone (pComponentPrivate_CC->pHandle,
+ pComponentPrivate_CC->pHandle->pApplicationPrivate,
+ pComponentPrivate_CC->LastOutputBufferHdrQueued);
+ }
pComponentPrivate_CC->cbInfo.EventHandler(
pComponentPrivate_CC->pHandle,
pComponentPrivate_CC->pHandle->pApplicationPrivate,
@@ -2336,6 +2347,7 @@ OMX_ERRORTYPE WMADECLCML_Callback (TUsnCodecEvent event,void * args [10])
#endif
}
}
+ pComponentPrivate_CC->first_buffer = 1;
}
if(event == EMMCodecDspMessageRecieved) {