Don't force key frame when decoding with errors
BUG=2241 R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2036004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4597 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -508,19 +508,13 @@ bool VCMJitterBuffer::NextMaybeIncompleteTimestamp(uint32_t* timestamp) {
|
||||
return false;
|
||||
}
|
||||
VCMFrameBuffer* oldest_frame = decodable_frames_.Front();
|
||||
|
||||
// If we have exactly one frame in the buffer, release it only if it is
|
||||
// complete. We know decodable_frames_ is not empty due to the prevoius
|
||||
// complete. We know decodable_frames_ is not empty due to the previous
|
||||
// check.
|
||||
if (decodable_frames_.size() == 1 && incomplete_frames_.empty()
|
||||
&& oldest_frame->GetState() != kStateComplete) {
|
||||
return false;
|
||||
}
|
||||
// Always start with a complete key frame.
|
||||
if (last_decoded_state_.in_initial_state() &&
|
||||
oldest_frame->FrameType() != kVideoFrameKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*timestamp = oldest_frame->TimeStamp();
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user