aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorywan171 <yi.a.wang@intel.com>2014-12-12 14:38:53 +0800
committerPatrick Tjin <pattjin@google.com>2014-12-17 14:06:49 -0800
commitd7a24953f38460360b0cbfc14145b4067f9ed02b (patch)
treefc41cd4feccfe69e75b4626fde41c63572068fd8
parent77e0e77a812f416a90713150431db498ad7559e5 (diff)
downloadandroid_hardware_intel_common_omx-components-d7a24953f38460360b0cbfc14145b4067f9ed02b.tar.gz
android_hardware_intel_common_omx-components-d7a24953f38460360b0cbfc14145b4067f9ed02b.tar.bz2
android_hardware_intel_common_omx-components-d7a24953f38460360b0cbfc14145b4067f9ed02b.zip
vp9 hybrid omx
if eos frame is non-shown frame, return a NULL frame with eos flag Bug: 18771255 Change-Id: Idc1312280e0aa4a89ec475ddcb26b08867d70953 Signed-off-by: ywan171 <yi.a.wang@intel.com>
-rw-r--r--videocodec/OMXVideoDecoderVP9Hybrid.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
index 483e484..cbca17c 100644
--- a/videocodec/OMXVideoDecoderVP9Hybrid.cpp
+++ b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
@@ -320,6 +320,13 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::FillRenderBuffer(OMX_BUFFERHEADERTYPE **
unsigned char *dst = buffer->pBuffer;
fb_index = mGetRawDataOutput(mCtx,mHybridCtx,dst,height,stride);
if (fb_index == -1) {
+ if (inportBufferFlags & OMX_BUFFERFLAG_EOS) {
+ // eos frame is non-shown frame
+ buffer->nFlags = OMX_BUFFERFLAG_EOS;
+ buffer->nOffset = 0;
+ buffer->nFilledLen = 0;
+ return OMX_ErrorNone;
+ }
LOGV("vpx_codec_get_frame return NULL.");
return OMX_ErrorNotReady;
}
@@ -333,6 +340,13 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::FillRenderBuffer(OMX_BUFFERHEADERTYPE **
fb_index = mGetOutput(mCtx,mHybridCtx, &mDecodedImageNewWidth, &mDecodedImageNewHeight);
if (fb_index == -1) {
+ if (inportBufferFlags & OMX_BUFFERFLAG_EOS) {
+ // eos frame is no-shown frame
+ buffer->nFlags = OMX_BUFFERFLAG_EOS;
+ buffer->nOffset = 0;
+ buffer->nFilledLen = 0;
+ return OMX_ErrorNone;
+ }
LOGV("vpx_codec_get_frame return NULL.");
return OMX_ErrorNotReady;
}