summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2013-05-16 19:19:21 +0530
committerIliyan Malchev <malchev@google.com>2013-07-09 13:09:51 -0700
commit355146b35a7f170e8e71e76d0850e41dbe6be9a1 (patch)
treea7a110647267b9eb6eb22577f4f04e994572d37f
parentb0caee6335fe7e04493b2a4f96f205bce4b1d7de (diff)
downloadmedia-jb-mr2-dev.tar.gz
mm-video: vdec: Fix movie studio crashjb-mr2-dev
This change updates crop information with latest data available with the driver. Bug: 9631244 Change-Id: I04e248c454ecf39e8a292879491db854ea9e916f Signed-off-by: Deepak Verma <dverma@codeaurora.org> Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r--mm-video/vidc/vdec/src/omx_vdec.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/mm-video/vidc/vdec/src/omx_vdec.cpp b/mm-video/vidc/vdec/src/omx_vdec.cpp
index 90ef992..edd6d7c 100644
--- a/mm-video/vidc/vdec/src/omx_vdec.cpp
+++ b/mm-video/vidc/vdec/src/omx_vdec.cpp
@@ -6784,11 +6784,17 @@ int omx_vdec::async_message_process (void *context, void* message)
|| (omx->rectangle.nWidth != vdec_msg->msgdata.output_frame.framesize.right)
|| (omx->rectangle.nHeight != vdec_msg->msgdata.output_frame.framesize.bottom)))
{
+ DEBUG_PRINT_LOW("Old crop info: left = %u top = %u width = %u height = %u\n",
+ omx->rectangle.nLeft, omx->rectangle.nTop,
+ omx->rectangle.nWidth, omx->rectangle.nHeight);
omx->rectangle.nLeft = vdec_msg->msgdata.output_frame.framesize.left;
omx->rectangle.nTop = vdec_msg->msgdata.output_frame.framesize.top;
omx->rectangle.nWidth = vdec_msg->msgdata.output_frame.framesize.right;
omx->rectangle.nHeight = vdec_msg->msgdata.output_frame.framesize.bottom;
DEBUG_PRINT_HIGH(" Crop information has changed");
+ DEBUG_PRINT_LOW("New crop info: left = %u top = %u width = %u height = %u\n",
+ omx->rectangle.nLeft, omx->rectangle.nTop,
+ omx->rectangle.nWidth, omx->rectangle.nHeight);
omx->post_event (OMX_CORE_OUTPUT_PORT_INDEX, OMX_IndexConfigCommonOutputCrop,
OMX_COMPONENT_GENERATE_PORT_RECONFIG);
}
@@ -7655,6 +7661,21 @@ OMX_ERRORTYPE omx_vdec::get_buffer_req(vdec_allocatorproperty *buffer_prop)
else
{
buf_size = buffer_prop->buffer_size;
+
+ ioctl_msg.in = NULL;
+ ioctl_msg.out = &drv_ctx.video_resolution;
+ if (ioctl(drv_ctx.video_driver_fd, VDEC_IOCTL_GET_PICRES, &ioctl_msg))
+ {
+ DEBUG_PRINT_ERROR("Error VDEC_IOCTL_GET_PICRES");
+ eRet = OMX_ErrorHardware;
+ return eRet;
+ }
+ else
+ {
+ update_resolution(drv_ctx.video_resolution.frame_width,
+ drv_ctx.video_resolution.frame_height);
+ }
+
if (client_extradata & OMX_FRAMEINFO_EXTRADATA)
{
DEBUG_PRINT_HIGH("Frame info extra data enabled!");