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:
parent
a70f945086
commit
e7d8c56c56
@ -275,7 +275,19 @@ VCMReceiver::FrameForDecoding(WebRtc_UWord16 maxWaitTimeMs,
|
|||||||
{
|
{
|
||||||
// No time to wait for a complete frame,
|
// No time to wait for a complete frame,
|
||||||
// check if we have an incomplete
|
// 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)
|
if (frame == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user