diff options
author | Andreas Huber <andih@google.com> | 2012-05-08 09:58:21 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-05-08 09:58:21 -0700 |
commit | 02accddf8d69da7b2b5e05631ad222cd842ff547 (patch) | |
tree | b23ea5df141f9da260dc20cde6e3c0651960b0cf /media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp | |
parent | a62bde0a391f65a418d77c46e6ba468433d81dba (diff) | |
download | frameworks_av-02accddf8d69da7b2b5e05631ad222cd842ff547.zip frameworks_av-02accddf8d69da7b2b5e05631ad222cd842ff547.tar.gz frameworks_av-02accddf8d69da7b2b5e05631ad222cd842ff547.tar.bz2 |
Fix both H.263 and MPEG4 decoders.
Change-Id: I6c76fa33f6ea4b439abc14c396a86c3553c85189
related-to-bug: 6460112
Diffstat (limited to 'media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp')
-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; |