summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2011-11-10 08:48:34 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-11-10 08:48:34 -0800
commitb42aea5b4c7cc7b2766f80f5ceda94b324d776e5 (patch)
tree5f06d48c8749af3a42f54ed85c01ac160e7b191e
parent7c063cf9679a2ecdda5e1639cfdca3e1084019f9 (diff)
parent977702929b085882aa7a748711cc3280f3195fbe (diff)
Merge "Don't believe the PV decoder's lies..." into ics-mr1
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index ddced5f5f5e8..aa07e5793a7f 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -421,8 +421,13 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
int32_t bufferSize = inHeader->nFilledLen;
+ // 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, &timestamp, &bufferSize,
+ mHandle, &bitstream, &timestamp, &tmp,
&useExtTimestamp,
outHeader->pBuffer) != PV_TRUE) {
LOGE("failed to decode video frame.");