summaryrefslogtreecommitdiffstats
path: root/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2011-11-09 10:40:31 +0900
committerJames Dong <jdong@google.com>2011-11-10 01:14:11 -0800
commit3e52aac216d7bb6f274a44d28838efba50bc9ec1 (patch)
tree4e49679e7519b734fcd644ef280d5cbb4db1b2e3 /sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c
parente91e13d8b8d0cac4848a06f39575983d0a8762ff (diff)
downloaddevice_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.zip
device_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.tar.gz
device_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.tar.bz2
Fix Empty thumbnails generated while in timelapse recording sometimes
Change-Id: Ia17ed033634c5e8709a04c974553fe426e7d9dcd Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com> related-to-bug: 5566262
Diffstat (limited to 'sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c
index cea12c3..052a4c9 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c
+++ b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c
@@ -1096,7 +1096,7 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT
SsbSipMfcDecSetConfig(hMFCHandle, MFC_DEC_SETCONF_POST_ENABLE, &configValue);
if (pMpeg4Dec->hMFCMpeg4Handle.bThumbnailMode == OMX_TRUE) {
- configValue = 0; // the number that you want to delay
+ configValue = 1; // the number that you want to delay
SsbSipMfcDecSetConfig(hMFCHandle, MFC_DEC_SETCONF_DISPLAY_DELAY, &configValue);
}
@@ -1236,11 +1236,16 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT
pOutputData->nFlags |= OMX_BUFFERFLAG_EOS;
pSECComponent->getAllDelayBuffer = OMX_FALSE;
}
+ if ((pMpeg4Dec->bFirstFrame == OMX_TRUE) &&
+ ((pOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
+ pOutputData->nFlags = (pOutputData->nFlags & (~OMX_BUFFERFLAG_EOS));
+ }
+
outputDataValid = OMX_FALSE;
/* ret = OMX_ErrorUndefined; */
ret = OMX_ErrorNone;
- }
+ }
if (ret == OMX_ErrorInputDataDecodeYet) {
pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].dataSize = oneFrameSize;
@@ -1280,10 +1285,15 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT
pMpeg4Dec->hMFCMpeg4Handle.pMFCStreamPhyBuffer = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].PhyAddr;
pSECComponent->processData[INPUT_PORT_INDEX].dataBuffer = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].VirAddr;
pSECComponent->processData[INPUT_PORT_INDEX].allocSize = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].bufferSize;
+ if (((pMpeg4Dec->hMFCMpeg4Handle.bThumbnailMode == OMX_TRUE) || (pSECComponent->bSaveFlagEOS == OMX_TRUE)) &&
+ (pMpeg4Dec->bFirstFrame == OMX_TRUE) &&
+ (outputDataValid == OMX_FALSE)) {
+ ret = OMX_ErrorInputDataDecodeYet;
+ }
pMpeg4Dec->bFirstFrame = OMX_FALSE;
}
- /** Fill Output Buffer **/
+ /** Fill Output Buffer **/
if (outputDataValid == OMX_TRUE) {
SEC_OMX_BASEPORT *pSECInputPort = &pSECComponent->pSECPort[INPUT_PORT_INDEX];
SEC_OMX_BASEPORT *pSECOutputPort = &pSECComponent->pSECPort[OUTPUT_PORT_INDEX];