Bugfix in VP8 wrapper Decode method
Failed to preserve the size parameter in the keyframe storage. Review URL: http://webrtc-codereview.appspot.com/48003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@113 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
e4d43fc727
commit
2f887323a0
@ -778,9 +778,10 @@ VP8Decoder::Decode(const EncodedImage& inputImage,
|
||||
}
|
||||
|
||||
WebRtc_UWord8* tempBuffer = _lastKeyFrame._buffer; // Save buffer ptr.
|
||||
WebRtc_UWord32 tempSize = _lastKeyFrame._size; // Save size.
|
||||
_lastKeyFrame = inputImage; // Shallow copy.
|
||||
_lastKeyFrame._buffer = tempBuffer; // Restore buffer ptr.
|
||||
_lastKeyFrame._length = bytesToCopy;
|
||||
_lastKeyFrame._size = tempSize; // Restore buffer size.
|
||||
if (!_lastKeyFrame._buffer)
|
||||
{
|
||||
// Allocate memory.
|
||||
@ -789,7 +790,8 @@ VP8Decoder::Decode(const EncodedImage& inputImage,
|
||||
}
|
||||
// Copy encoded frame.
|
||||
memcpy(_lastKeyFrame._buffer, inputImage._buffer + numberOfBytes,
|
||||
_lastKeyFrame._length);
|
||||
bytesToCopy);
|
||||
_lastKeyFrame._length = bytesToCopy;
|
||||
}
|
||||
|
||||
int lastRefUpdates = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user