Skip to content

Commit b42aea5

Browse files
theandi666Android (Google) Code Review
authored andcommitted
Merge "Don't believe the PV decoder's lies..." into ics-mr1
2 parents 7c063cf + 9777029 commit b42aea5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,13 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
421421

422422
int32_t bufferSize = inHeader->nFilledLen;
423423

424+
// The PV decoder is lying to us, sometimes it'll claim to only have
425+
// consumed a subset of the buffer when it clearly consumed all of it.
426+
// ignore whatever it says...
427+
int32_t tmp = bufferSize;
428+
424429
if (PVDecodeVideoFrame(
425-
mHandle, &bitstream, &timestamp, &bufferSize,
430+
mHandle, &bitstream, &timestamp, &tmp,
426431
&useExtTimestamp,
427432
outHeader->pBuffer) != PV_TRUE) {
428433
LOGE("failed to decode video frame.");

0 commit comments

Comments
 (0)