From a211c6f375b2f37d9e614e32148c2c4166132017 Mon Sep 17 00:00:00 2001 From: Deva Ramasubramanian Date: Tue, 23 Jul 2013 18:52:24 -0700 Subject: mm-video: vidc: Remove hardcoding of BufCountActual When metabuffer mode is set, we're harcoding the nBufCountActual to 4. In most cases we get away with it, except in cases where nBufCountMin happens to be higher. This triggers quite a few sanity-check conditions in the component and driver fail. Hence to avoid this situation, just reset nBufCountActual to nBufCountMin. Change-Id: Ib7315ed10a2ff6f4270289f9c75868de4792fb8a --- msm8974/mm-video-legacy/vidc/venc/src/omx_video_encoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msm8974/mm-video-legacy/vidc/venc/src/omx_video_encoder.cpp b/msm8974/mm-video-legacy/vidc/venc/src/omx_video_encoder.cpp index 8fb8f6e3..8dd637ad 100644 --- a/msm8974/mm-video-legacy/vidc/venc/src/omx_video_encoder.cpp +++ b/msm8974/mm-video-legacy/vidc/venc/src/omx_video_encoder.cpp @@ -1007,7 +1007,7 @@ OMX_ERRORTYPE omx_venc::set_parameter(OMX_IN OMX_HANDLETYPE hComp, } meta_mode_enable = pParam->bStoreMetaData; if(meta_mode_enable) { - m_sInPortDef.nBufferCountActual = 4; + m_sInPortDef.nBufferCountActual = m_sInPortDef.nBufferCountMin; if(handle->venc_set_param(&m_sInPortDef,OMX_IndexParamPortDefinition) != true) { DEBUG_PRINT_ERROR("\nERROR: venc_set_param input failed"); -- cgit v1.2.3