diff options
author | Andreas Huber <andih@google.com> | 2012-05-08 10:28:29 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-08 10:28:29 -0700 |
commit | a9623e018737889d32f6b231f913a70d020c7ac5 (patch) | |
tree | ea433771b534d66f4d975c76b5ca3e4c242fdb30 | |
parent | 1d02a827bc0bb5023a551bc9ce3fb37457240daa (diff) | |
parent | 02accddf8d69da7b2b5e05631ad222cd842ff547 (diff) | |
download | frameworks_av-a9623e018737889d32f6b231f913a70d020c7ac5.zip frameworks_av-a9623e018737889d32f6b231f913a70d020c7ac5.tar.gz frameworks_av-a9623e018737889d32f6b231f913a70d020c7ac5.tar.bz2 |
Merge "Fix both H.263 and MPEG4 decoders." into jb-dev
-rw-r--r-- | media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index a34a0ca..d527fde 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -420,12 +420,11 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) { useExtTimestamp ? (inHeader->nTimeStamp + 500) / 1000 : 0xFFFFFFFF; int32_t bufferSize = inHeader->nFilledLen; + int32_t tmp = bufferSize; // The PV decoder is lying to us, sometimes it'll claim to only have // consumed a subset of the buffer when it clearly consumed all of it. // ignore whatever it says... - int32_t tmp = bufferSize; - if (PVDecodeVideoFrame( mHandle, &bitstream, ×tamp, &tmp, &useExtTimestamp, @@ -444,9 +443,8 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) { // decoder deals in ms, OMX in us. outHeader->nTimeStamp = timestamp * 1000; - CHECK_LE(bufferSize, inHeader->nFilledLen); - inHeader->nOffset += inHeader->nFilledLen - bufferSize; - inHeader->nFilledLen = bufferSize; + inHeader->nOffset += bufferSize; + inHeader->nFilledLen = 0; if (inHeader->nFilledLen == 0) { inInfo->mOwnedByUs = false; |