aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xvideocodec/OMXVideoDecoderBase.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 7d61200..b53ec5c 100755
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -356,11 +356,12 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess(
if (isResolutionChange) {
HandleFormatChange();
}
-
+#ifndef ASUS_ZENFONE2_LP_BLOBS
if (mFlushMode) {
LOGI("in mFlushMode, do HandleFormatChange.");
HandleFormatChange();
} else {
+#endif
// Actually, if mAPMode is set, mWorkingMode should be GRAPHICBUFFER_MODE.
if (((mAPMode == METADATA_MODE) && (mWorkingMode == GRAPHICBUFFER_MODE)) && mFormatChanged) {
if (((*pBuffers[OUTPORT_INDEX])->nFlags & OMX_BUFFERFLAG_EOS)
@@ -368,6 +369,11 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess(
|| (mVideoDecoder->getOutputQueueLength() == 0)
#endif
) {
+#ifdef ASUS_ZENFONE2_LP_BLOBS
+ HandleFormatChange();
+ }
+ }
+#else
// Format changed, set mFlushMode, clear eos
mFlushMode = true;
mFormatChanged = false;
@@ -375,6 +381,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess(
}
}
}
+#endif
// TODO: continue decoding
return ret;
@@ -452,16 +459,14 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess(
if (isResolutionChange) {
HandleFormatChange();
}
-
+#ifndef ASUS_ZENFONE2_LP_BLOBS
if (mFlushMode) {
LOGI("in mFlushMode, do HandleFormatChange.");
HandleFormatChange();
} else {
if (((mAPMode == METADATA_MODE) && (mWorkingMode == GRAPHICBUFFER_MODE)) && mFormatChanged) {
if (((*pBuffers[OUTPORT_INDEX])->nFlags & OMX_BUFFERFLAG_EOS)
-#ifndef ASUS_ZENFONE2_LP_BLOBS
|| (mVideoDecoder->getOutputQueueLength() == 0)
-#endif
) {
// Format changed, set mFlushMode, clear eos.
mFlushMode = true;
@@ -470,6 +475,14 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess(
}
}
}
+#else
+ if (((mAPMode == METADATA_MODE) && (mWorkingMode == GRAPHICBUFFER_MODE)) && mFormatChanged) {
+ if (((*pBuffers[OUTPORT_INDEX])->nFlags & OMX_BUFFERFLAG_EOS)
+ ) {
+ HandleFormatChange();
+ }
+ }
+#endif
bool inputEoS = ((*pBuffers[INPORT_INDEX])->nFlags & OMX_BUFFERFLAG_EOS);
bool outputEoS = ((*pBuffers[OUTPORT_INDEX])->nFlags & OMX_BUFFERFLAG_EOS);
@@ -717,12 +730,13 @@ OMX_ERRORTYPE OMXVideoDecoderBase::FillRenderBuffer(OMX_BUFFERHEADERTYPE **pBuff
//pthread_mutex_lock(&mSerializationLock);
const VideoRenderBuffer *renderBuffer = NULL;
//pthread_mutex_unlock(&mSerializationLock);
-
+#ifndef ASUS_ZENFONE2_LP_BLOBS
// in mFlushMode, provide empty buffer.
if (mFlushMode) {
buffer->nFilledLen = 0;
return OMX_ErrorNone;
}
+#endif
if (((mAPMode == METADATA_MODE) && (mWorkingMode == GRAPHICBUFFER_MODE)) && mFormatChanged) {
renderBuffer = mVideoDecoder->getOutput(true, ErrBufPtr);