diff options
| author | wfeng6 <wei.feng@intel.com> | 2013-11-05 22:35:28 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:55 -0700 |
| commit | 75fff19d64c6554afa97cf6ce6c692c75df416f0 (patch) | |
| tree | 617d96ef0b31744e4b946d2c9b1f71486f7705be /videocodec/OMXVideoEncoderAVC.cpp | |
| parent | 0364c3c0258bb9588f3102358073da46d33193bb (diff) | |
| download | android_hardware_intel_common_omx-components-75fff19d64c6554afa97cf6ce6c692c75df416f0.tar.gz android_hardware_intel_common_omx-components-75fff19d64c6554afa97cf6ce6c692c75df416f0.tar.bz2 android_hardware_intel_common_omx-components-75fff19d64c6554afa97cf6ce6c692c75df416f0.zip | |
Fix the video editor export failure on PDK
BZ: 143767
When video editor starts encoding, it will first feed a
dump frame to the encoder and give a NULL buffer to signal
the EOS. Encoder middleware will be stuck in
VideoEncoderAVC->getOutput. In this fix, when this happens
we just return OMX_ErrorNone to avoid deadlock.
Change-Id: I35089df9ca1728cfec3af5e9e0638615999009eb
Signed-off-by: wfeng6 <wei.feng@intel.com>
Diffstat (limited to 'videocodec/OMXVideoEncoderAVC.cpp')
| -rwxr-xr-x | videocodec/OMXVideoEncoderAVC.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/videocodec/OMXVideoEncoderAVC.cpp b/videocodec/OMXVideoEncoderAVC.cpp index 30c892e..4d5cd83 100755 --- a/videocodec/OMXVideoEncoderAVC.cpp +++ b/videocodec/OMXVideoEncoderAVC.cpp @@ -575,10 +575,9 @@ OMX_ERRORTYPE OMXVideoEncoderAVC::ProcessorProcess( if (buffers[INPORT_INDEX]->nFlags & OMX_BUFFERFLAG_EOS) { LOGV("%s(),%d: got OMX_BUFFERFLAG_EOS\n", __func__, __LINE__); - if((inBuf.size<=0 || inBuf.data == NULL) && (mSyncEncoding || (eInfo.FrameCount == 0))) { + if((inBuf.size<=0 || inBuf.data == NULL) && (mSyncEncoding || (eInfo.FrameCount <= 1))) { LOGV("The Input buf is just a empty EOS buffer, in Sync encode," "nothing to do, return with no error\n"); retains[INPORT_INDEX] = BUFFER_RETAIN_NOT_RETAIN; - retains[OUTPORT_INDEX] = BUFFER_RETAIN_GETAGAIN; return OMX_ErrorNone; } } else if(inBuf.size<=0 || inBuf.data == NULL) { |
