Fix for dual decoder in VCM receiver

In VCMReceiver::FrameForDecoding, one of the if-cases could sometimes
extract an incomplete frame without first copying the state to the
dual decoder.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1221 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2011-12-16 15:40:52 +00:00
parent a70f945086
commit e7d8c56c56

View File

@ -275,7 +275,19 @@ VCMReceiver::FrameForDecoding(WebRtc_UWord16 maxWaitTimeMs,
{
// No time to wait for a complete frame,
// check if we have an incomplete
frame = _jitterBuffer.GetFrameForDecoding();
const bool dualReceiverEnabledAndPassive = (dualReceiver != NULL &&
dualReceiver->State() == kPassive &&
dualReceiver->NackMode() == kNackInfinite);
if (dualReceiverEnabledAndPassive &&
!_jitterBuffer.CompleteSequenceWithNextFrame())
{
// Jitter buffer state might get corrupt with this frame.
dualReceiver->CopyJitterBufferStateFromReceiver(*this);
frame = _jitterBuffer.GetFrameForDecoding();
assert(frame);
} else {
frame = _jitterBuffer.GetFrameForDecoding();
}
}
if (frame == NULL)
{