From cd8cea50a6bd4c65f17cf44a3b0907187f3fdaca Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Wed, 11 Jan 2012 14:17:44 +0000 Subject: [PATCH] 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 --- src/modules/video_coding/main/source/jitter_buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/video_coding/main/source/jitter_buffer.cc b/src/modules/video_coding/main/source/jitter_buffer.cc index a3766b489c..a22c04670c 100644 --- a/src/modules/video_coding/main/source/jitter_buffer.cc +++ b/src/modules/video_coding/main/source/jitter_buffer.cc @@ -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(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; }