diff options
| author | xiao <fengx.xiao@intel.com> | 2012-03-08 13:46:46 +0800 |
|---|---|---|
| committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:02:46 -0700 |
| commit | d01f11592baa374bf1c38ee2d57e42b9f3ddc28d (patch) | |
| tree | 12f6e35866592a0b1b28b5f492feb8bb8ab4cf2d | |
| parent | 747c717e9477b5b660f39a2b737de5e968fa7f9d (diff) | |
| download | android_hardware_intel_common_omx-components-d01f11592baa374bf1c38ee2d57e42b9f3ddc28d.tar.gz android_hardware_intel_common_omx-components-d01f11592baa374bf1c38ee2d57e42b9f3ddc28d.tar.bz2 android_hardware_intel_common_omx-components-d01f11592baa374bf1c38ee2d57e42b9f3ddc28d.zip | |
Refine multiple frame decoder support in omx
BZ: 26883
Pick up next frame info from PackedFrameData
Change-Id: I97d05e125285d4fe5ce4e1ad34924657fd45f3c8
Signed-off-by: xiao <fengx.xiao@intel.com>
Reviewed-on: http://android.intel.com:8080/37902
Reviewed-by: Qiu, Junhai <junhai.qiu@intel.com>
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
| -rw-r--r-- | videocodec/OMXVideoDecoderBase.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp index a99f87e..17b7a3c 100644 --- a/videocodec/OMXVideoDecoderBase.cpp +++ b/videocodec/OMXVideoDecoderBase.cpp @@ -318,11 +318,14 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorProcess( retains[OUTPORT_INDEX] = BUFFER_RETAIN_GETAGAIN; return OMX_ErrorNone; } else if (status == DECODE_MULTIPLE_FRAME){ - (*pBuffers[INPORT_INDEX])->nOffset += decodeBuffer.offSet; - (*pBuffers[INPORT_INDEX])->nTimeStamp = decodeBuffer.nextTimeStamp; - (*pBuffers[INPORT_INDEX])->nFilledLen -= decodeBuffer.offSet; - retains[INPORT_INDEX] = BUFFER_RETAIN_GETAGAIN; - LOGV("Find multiple frame in a buffer, next frame offset =%d, timestamp=%lld", (*pBuffers[INPORT_INDEX])->nOffset, (*pBuffers[INPORT_INDEX])->nTimeStamp); + if (decodeBuffer.ext != NULL && decodeBuffer.ext->extType == PACKED_FRAME_TYPE && decodeBuffer.ext->extData != NULL) { + PackedFrameData* nextFrame = (PackedFrameData*)decodeBuffer.ext->extData; + (*pBuffers[INPORT_INDEX])->nOffset += nextFrame->offSet; + (*pBuffers[INPORT_INDEX])->nTimeStamp = nextFrame->timestamp; + (*pBuffers[INPORT_INDEX])->nFilledLen -= nextFrame->offSet; + retains[INPORT_INDEX] = BUFFER_RETAIN_GETAGAIN; + LOGV("Find multiple frame in a buffer, next frame offset =%d, timestamp=%lld", (*pBuffers[INPORT_INDEX])->nOffset, (*pBuffers[INPORT_INDEX])->nTimeStamp); + } } else if (status != DECODE_SUCCESS && status != DECODE_FRAME_DROPPED) { if (checkFatalDecoderError(status)) { |
