Merge "Fix the 0-timestamp issue Don't return an output buffer back to the omx client if the input buffer(s) processed are only meant for setting the configuration"
diff --git a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c
index ad2eebd..97844e1 100644
--- a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c
+++ b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c
@@ -6255,18 +6255,20 @@
if (pComponentPrivate->ProcessMode == 0) {
OMX_U8 ucIndex = 0;
OMX_PTR pBufferFlags = NULL;
- ucIndex = VIDDEC_CircBuf_GetHead(pComponentPrivate,
+ if ((pBuffHead->nFlags & OMX_BUFFERFLAG_CODECCONFIG) == 0 ) { //tag if not equal to OMX_BUFFERFLAG_CODECCONFIG
+ ucIndex = VIDDEC_CircBuf_GetHead(pComponentPrivate,
VIDDEC_CBUFFER_TIMESTAMP,
VIDDEC_INPUT_PORT);
- pComponentPrivate->aBufferFlags[ucIndex].nTimeStamp = pBuffHead->nTimeStamp;
- pBuffHead->nFlags &= ~OMX_BUFFERFLAG_EOS;
- pComponentPrivate->aBufferFlags[ucIndex].nFlags = pBuffHead->nFlags;
- pComponentPrivate->aBufferFlags[ucIndex].nTickCount = pBuffHead->nTickCount;
- pBufferFlags = &pComponentPrivate->aBufferFlags[ucIndex];
- VIDDEC_CircBuf_Add(pComponentPrivate,
+ pComponentPrivate->aBufferFlags[ucIndex].nTimeStamp = pBuffHead->nTimeStamp;
+ pBuffHead->nFlags &= ~OMX_BUFFERFLAG_EOS;
+ pComponentPrivate->aBufferFlags[ucIndex].nFlags = pBuffHead->nFlags;
+ pComponentPrivate->aBufferFlags[ucIndex].nTickCount = pBuffHead->nTickCount;
+ pBufferFlags = &pComponentPrivate->aBufferFlags[ucIndex];
+ VIDDEC_CircBuf_Add(pComponentPrivate,
VIDDEC_CBUFFER_TIMESTAMP,
VIDDEC_INPUT_PORT,
pBufferFlags);
+ }
}
else {
pComponentPrivate->arrBufIndex[pComponentPrivate->nInBufIndex] = pBuffHead->nTimeStamp;