If do "buffer flush" without doing srcIn function,
In case of BUFFER_COPY,
always return OMX_ErrorBadParameter
in the codecEnQueueAllBuffer function.
Change-Id: Ia1631de9ecb02f83b5cfc8edbacfbef453705864
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
FunctionIn();
+ if ((nPortIndex != INPUT_PORT_INDEX) && (nPortIndex != OUTPUT_PORT_INDEX)) {
+ ret = OMX_ErrorBadPortIndex;
+ goto EXIT;
+ }
+
if ((nPortIndex == INPUT_PORT_INDEX) &&
(pH264Enc->bSourceStart == OMX_TRUE)) {
Exynos_CodecBufferReset(pExynosComponent, INPUT_PORT_INDEX);
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "pVideoEnc->pMFCEncInputBuffer[%d]->pVirAddr[1]: 0x%x", i, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[1]);
}
pOutbufOps->Clear_Queue(hMFCHandle);
- } else {
- ret = OMX_ErrorBadParameter;
- goto EXIT;
}
EXIT:
FunctionIn();
+ if ((nPortIndex != INPUT_PORT_INDEX) && (nPortIndex != OUTPUT_PORT_INDEX)) {
+ ret = OMX_ErrorBadPortIndex;
+ goto EXIT;
+ }
+
if ((nPortIndex == INPUT_PORT_INDEX) &&
(pMpeg4Enc->bSourceStart == OMX_TRUE)) {
Exynos_CodecBufferReset(pExynosComponent, INPUT_PORT_INDEX);
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "pVideoEnc->pMFCEncInputBuffer[%d]->pVirAddr[1]: 0x%x", i, pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[1]);
}
pOutbufOps->Clear_Queue(hMFCHandle);
- } else {
- ret = OMX_ErrorBadParameter;
- goto EXIT;
}
EXIT: