Simplify VCMTimestampMap.
Fixes code formatting and uses size_t properly. Also makes use of IsNewerTimestamp instead of a simple > check, which should fix an edge-case bug. BUG= R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1358863002 Cr-Commit-Position: refs/heads/master@{#10094}
This commit is contained in:
@ -53,8 +53,7 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage) {
|
||||
VCMReceiveCallback* callback;
|
||||
{
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
frameInfo = static_cast<VCMFrameInformation*>(
|
||||
_timestampMap.Pop(decodedImage.timestamp()));
|
||||
frameInfo = _timestampMap.Pop(decodedImage.timestamp());
|
||||
callback = _receiveCallback;
|
||||
}
|
||||
|
||||
@ -103,10 +102,10 @@ uint64_t VCMDecodedFrameCallback::LastReceivedPictureID() const
|
||||
return _lastReceivedPictureID;
|
||||
}
|
||||
|
||||
int32_t VCMDecodedFrameCallback::Map(uint32_t timestamp, VCMFrameInformation* frameInfo)
|
||||
{
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
return _timestampMap.Add(timestamp, frameInfo);
|
||||
void VCMDecodedFrameCallback::Map(uint32_t timestamp,
|
||||
VCMFrameInformation* frameInfo) {
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
_timestampMap.Add(timestamp, frameInfo);
|
||||
}
|
||||
|
||||
int32_t VCMDecodedFrameCallback::Pop(uint32_t timestamp)
|
||||
|
||||
Reference in New Issue
Block a user