Reverts r807 and fixes the real issue in the VCM.
This fixes an issue in the VCM where we don't wait for a packet to arrive if the jitter buffer is empty. This also fixes an issue where an old packet can trigger a packet event signal for a future frame. BUG= TEST= Review URL: http://webrtc-codereview.appspot.com/248001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@814 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -54,8 +54,7 @@ VCMJitterBuffer::CompleteDecodableKeyFrameCriteria(VCMFrameBuffer* frame,
|
||||
const VCMFrameBufferStateEnum state = frame->GetState();
|
||||
// We can decode key frame or decodable/complete frames.
|
||||
return (frame->FrameType() == kVideoFrameKey) &&
|
||||
((state == kStateComplete)
|
||||
|| (state == kStateDecodable));
|
||||
(state == kStateComplete || state == kStateDecodable);
|
||||
}
|
||||
|
||||
// Constructor
|
||||
@@ -889,7 +888,9 @@ VCMJitterBuffer::GetNextTimeStamp(WebRtc_UWord32 maxWaitTimeMS,
|
||||
|
||||
if (oldestFrame == NULL)
|
||||
{
|
||||
_packetEvent.Reset();
|
||||
_critSect.Leave();
|
||||
|
||||
if (_packetEvent.Wait(maxWaitTimeMS) == kEventSignaled)
|
||||
{
|
||||
// are we closing down the Jitter buffer
|
||||
@@ -908,7 +909,6 @@ VCMJitterBuffer::GetNextTimeStamp(WebRtc_UWord32 maxWaitTimeMS,
|
||||
_critSect.Enter();
|
||||
}
|
||||
}
|
||||
_packetEvent.Reset();
|
||||
|
||||
if (oldestFrame == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user