video_coding/jitter buffer: Reduce delay on a complete frame: No need for the next frame when current frame is already complete.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1069 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2011-11-30 18:38:01 +00:00
parent 511f82eee9
commit b9db43e1b6

View File

@ -979,7 +979,7 @@ VCMJitterBuffer::CompleteSequenceWithNextFrame()
VCMFrameBuffer* oldestFrame = oldestFrameListItem->GetItem();
const VCMFrameListItem* nextFrameItem =
_frameBuffersTSOrder.Next(oldestFrameListItem);
if (nextFrameItem == NULL)
if (nextFrameItem == NULL && oldestFrame->GetState() != kStateComplete)
{
// Frame not ready to be decoded.
return true;
@ -1047,7 +1047,8 @@ VCMJitterBuffer::GetFrameForDecoding()
const VCMFrameListItem* nextFrameItem =
_frameBuffersTSOrder.Next(oldestFrameListItem);
if (nextFrameItem == NULL)
// Don't output incomplete frames if subsequent frames haven't arrived yet.
if (nextFrameItem == NULL && oldestFrame->GetState() != kStateComplete)
{
return NULL;
}