Loading media/libstagefright/omx/GraphicBufferSource.cpp +18 −1 Original line number Diff line number Diff line Loading @@ -369,6 +369,12 @@ void GraphicBufferSource::suspend(bool suspend) { } else if (err != OK) { ALOGW("suspend: acquireBuffer returned err=%d", err); break; } else if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("suspend: corrupted buffer index (%d)", item.mBuf); break; } --mNumFramesAvailable; Loading Loading @@ -419,6 +425,10 @@ bool GraphicBufferSource::fillCodecBuffer_l() { // now what? fake end-of-stream? ALOGW("fillCodecBuffer_l: acquireBuffer returned err=%d", err); return false; } else if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("fillCodecBuffer_l: corrupted buffer index (%d)", item.mBuf); return false; } mNumFramesAvailable--; Loading Loading @@ -769,6 +779,13 @@ void GraphicBufferSource::onFrameAvailable() { BufferQueue::BufferItem item; status_t err = mConsumer->acquireBuffer(&item, 0); if (err == OK) { if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("onFrameAvailable: corrupted buffer index (%d)", item.mBuf); return; } // If this is the first time we're seeing this buffer, add it to our // slot table. if (item.mGraphicBuffer != NULL) { Loading Loading
media/libstagefright/omx/GraphicBufferSource.cpp +18 −1 Original line number Diff line number Diff line Loading @@ -369,6 +369,12 @@ void GraphicBufferSource::suspend(bool suspend) { } else if (err != OK) { ALOGW("suspend: acquireBuffer returned err=%d", err); break; } else if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("suspend: corrupted buffer index (%d)", item.mBuf); break; } --mNumFramesAvailable; Loading Loading @@ -419,6 +425,10 @@ bool GraphicBufferSource::fillCodecBuffer_l() { // now what? fake end-of-stream? ALOGW("fillCodecBuffer_l: acquireBuffer returned err=%d", err); return false; } else if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("fillCodecBuffer_l: corrupted buffer index (%d)", item.mBuf); return false; } mNumFramesAvailable--; Loading Loading @@ -769,6 +779,13 @@ void GraphicBufferSource::onFrameAvailable() { BufferQueue::BufferItem item; status_t err = mConsumer->acquireBuffer(&item, 0); if (err == OK) { if (item.mBuf < 0 || item.mBuf >= BufferQueue::NUM_BUFFER_SLOTS) { // Invalid buffer index ALOGW("onFrameAvailable: corrupted buffer index (%d)", item.mBuf); return; } // If this is the first time we're seeing this buffer, add it to our // slot table. if (item.mGraphicBuffer != NULL) { Loading