Fix decode error in NACK/FEC mode after network glitch.

Caused when recyclingframes until the next key frame to
regain frame buffers when the jitter buffer is full.

BUG=http://code.google.com/p/webrtc/issues/detail?id=225
TEST=

Review URL: http://webrtc-codereview.appspot.com/350005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1390 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2012-01-11 14:17:44 +00:00
parent 684c7b71c3
commit cd8cea50a6

View File

@ -1313,7 +1313,7 @@ VCMJitterBuffer::CreateNackList(WebRtc_UWord16& nackSize, bool& listExtended)
while (numberOfSeqNum > kNackHistoryLength)
{
foundKeyFrame = RecycleFramesUntilKeyFrame();
foundKeyFrame = RecycleFramesUntilKeyFrame();
if (!foundKeyFrame)
{
@ -1356,7 +1356,6 @@ VCMJitterBuffer::CreateNackList(WebRtc_UWord16& nackSize, bool& listExtended)
// Set the last decoded sequence number to current high.
// This is to not get a large nack list again right away
_lastDecodedState.SetSeqNum(static_cast<uint16_t>(highSeqNum));
_waitingForKeyFrame = true;
// Set to trigger key frame signal
nackSize = 0xffff;
listExtended = true;
@ -1747,6 +1746,7 @@ VCMJitterBuffer::RecycleFramesUntilKeyFrame()
return true;
}
}
_waitingForKeyFrame = true;
_lastDecodedState.Reset(); // TODO (mikhal): no sync
return false;
}