adjust vp9 hybrid output buffer count to avoid play freeze caused by no available buffer
Bug: 17729532
BZ: 225243
Change-Id: I779ce0febbd65f2a436cddc671f4156b2d1c3d69
Signed-off-by: ywan171 <yi.a.wang@intel.com>
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
index 8726e56..364a445 100644
--- a/videocodec/OMXVideoDecoderVP9Hybrid.cpp
+++ b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
@@ -187,7 +187,9 @@
OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::ProcessorFlush(OMX_U32 portIndex) {
if (portIndex == INPORT_INDEX || portIndex == OMX_ALL) {
// end the last frame
+ unsigned int width, height;
mDecoderDecode(mCtx,mHybridCtx,NULL,0,true);
+ mGetOutput(mCtx,mHybridCtx, &width, &height);
mLastTimeStamp = 0;
}
return OMX_ErrorNone;
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.h b/videocodec/OMXVideoDecoderVP9Hybrid.h
index f0fc2f1..2b11ae6 100644
--- a/videocodec/OMXVideoDecoderVP9Hybrid.h
+++ b/videocodec/OMXVideoDecoderVP9Hybrid.h
@@ -93,7 +93,7 @@
INPORT_MIN_BUFFER_COUNT = 1,
INPORT_ACTUAL_BUFFER_COUNT = 5,
INPORT_BUFFER_SIZE = 1382400,
- OUTPORT_NATIVE_BUFFER_COUNT = 12, // 8 reference + 1 current + 3 for asynchronized mode
+ OUTPORT_NATIVE_BUFFER_COUNT = 15, // 8 reference + 2 current + 4 for asynchronized mode + 1 free buffer
};
};