summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngela Stegmaier <angelabaker@ti.com>2018-03-14 15:32:21 -0500
committerAngela Stegmaier <angelabaker@ti.com>2018-03-23 15:08:58 -0600
commite5636d9d8d81ce627c4f0d13f6775ada81277da3 (patch)
tree16059417de9eb71fff5b35bd70a3ea4d7ee9ad62
parent51c77eb96914f21b6d23fd2f2a7c35fb25c9dfd5 (diff)
downloaddra7xx-e5636d9d8d81ce627c4f0d13f6775ada81277da3.tar.gz
OMX: Video Decoder: Update InputPortDef width/height after decoding header information
There might be a change in width/height, and the input port info needs to be updated in this case so that the change is propagated to the application. Change-Id: Iebeac44dd2bf370cb38d56e824cb1ba939f8e8a0 Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
-rw-r--r--omx/videodecode/omx_videodec_common/src/omx_video_decoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c
index 1432087..c688277 100644
--- a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c
+++ b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c
@@ -1002,6 +1002,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
OMX_U32 ii = 0, i, jj = 0;
OMX_U32 nStride = 0;
OMX_PARAM_PORTDEFINITIONTYPE *pOutputPortDef = NULL;
+ OMX_PARAM_PORTDEFINITIONTYPE *pInputPortDef = NULL;
OMX_BOOL nIsDioReady = OMX_FALSE;
XDAS_Int32 status;
XDM2_BufDesc *pInBufDescPtr = NULL;
@@ -1028,6 +1029,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
OMX_CHECK(pVidDecComp != NULL, OMX_ErrorBadParameter);
pOutputPortDef = &(pVidDecComp->sBase.pPorts[OMX_VIDDEC_OUTPUT_PORT]->sPortDef);
+ pInputPortDef = &(pVidDecComp->sBase.pPorts[OMX_VIDDEC_INPUT_PORT]->sPortDef);
out2DAllocParam = pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT];
/*! Ensure that the stride on output portdef structure is more than
@@ -1239,6 +1241,8 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
pOutputPortDef->format.video.nStride = pOutputPortDef->format.video.nFrameWidth;
pOutputPortDef->nBufferSize = pOutputPortDef->format.video.nStride *
((pOutputPortDef->format.video.nFrameHeight * 3) >> 1);
+ pInputPortDef->format.video.nFrameWidth = out2DAllocParam.nWidth;
+ pInputPortDef->format.video.nFrameHeight = out2DAllocParam.nHeight;
pVidDecComp->sBase.pPvtData->fpDioCancel(hComponent,
OMX_VIDDEC_INPUT_PORT, pInBufHeader);