summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp12
1 files changed, 12 insertions, 0 deletions
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 69eaf1c4..788a89d0 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -9670,10 +9670,22 @@ OMX_ERRORTYPE omx_vdec::update_portdef(OMX_PARAM_PORTDEFINITIONTYPE *portDefn)
fmt.fmt.pix_mp.pixelformat = output_capability;
} else if (1 == portDefn->nPortIndex) {
unsigned int buf_size = 0;
+ int ret = 0;
if (!client_buffers.update_buffer_req()) {
DEBUG_PRINT_ERROR("client_buffers.update_buffer_req Failed");
return OMX_ErrorHardware;
}
+
+ memset(&fmt, 0x0, sizeof(struct v4l2_format));
+ fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
+ fmt.fmt.pix_mp.pixelformat = capture_capability;
+ ret = ioctl(drv_ctx.video_driver_fd, VIDIOC_G_FMT, &fmt);
+ if (ret) {
+ DEBUG_PRINT_ERROR("Get Resolution failed");
+ return OMX_ErrorHardware;
+ }
+ drv_ctx.op_buf.buffer_size = fmt.fmt.pix_mp.plane_fmt[0].sizeimage;
+
if (!client_buffers.get_buffer_req(buf_size)) {
DEBUG_PRINT_ERROR("update buffer requirements");
return OMX_ErrorHardware;