mm-video-v4l2: Update buffer count for decoder bitstream port always
OMX initializes with default resolution. Later, parser would send actual
resolution for the current clip. Driver then re-calculates buffer count
based on new resolution. OMX should always update buffer count if there is
change in bitstream port update (e.g. input resolution change).
Change-Id: I7784a50c7f7065c7643d3e2842283e55b86029ed
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 2e22e50..906ae6c 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -7181,8 +7181,7 @@
return OMX_ErrorHardware;
}
drv_ctx.ip_buf.mincount = control.value;
- if (drv_ctx.ip_buf.actualcount < control.value)
- drv_ctx.ip_buf.actualcount = control.value;
+ drv_ctx.ip_buf.actualcount = control.value;
portDefn->eDir = OMX_DirInput;
portDefn->nBufferCountActual = drv_ctx.ip_buf.actualcount;