removing redundant calls to cleanframes
Review URL: https://webrtc-codereview.appspot.com/1318004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3844 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -512,8 +512,6 @@ VCMEncodedFrame* VCMJitterBuffer::GetCompleteFrameForDecoding(
|
|||||||
|
|
||||||
oldest_frame->SetState(kStateDecoding);
|
oldest_frame->SetState(kStateDecoding);
|
||||||
|
|
||||||
CleanUpOldOrEmptyFrames();
|
|
||||||
|
|
||||||
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
||||||
waiting_for_key_frame_ = false;
|
waiting_for_key_frame_ = false;
|
||||||
}
|
}
|
||||||
@@ -583,8 +581,6 @@ VCMEncodedFrame* VCMJitterBuffer::GetFrameForDecoding() {
|
|||||||
// Set as decoding. Propagates the missing_frame bit.
|
// Set as decoding. Propagates the missing_frame bit.
|
||||||
oldest_frame->SetState(kStateDecoding);
|
oldest_frame->SetState(kStateDecoding);
|
||||||
|
|
||||||
CleanUpOldOrEmptyFrames();
|
|
||||||
|
|
||||||
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
||||||
waiting_for_key_frame_ = false;
|
waiting_for_key_frame_ = false;
|
||||||
}
|
}
|
||||||
@@ -1029,9 +1025,6 @@ VCMEncodedFrame* VCMJitterBuffer::GetFrameForDecodingNACK() {
|
|||||||
// decoder.
|
// decoder.
|
||||||
oldest_frame->SetState(kStateDecoding);
|
oldest_frame->SetState(kStateDecoding);
|
||||||
|
|
||||||
// Clean up old frames and empty frames.
|
|
||||||
CleanUpOldOrEmptyFrames();
|
|
||||||
|
|
||||||
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
if (oldest_frame->FrameType() == kVideoFrameKey) {
|
||||||
waiting_for_key_frame_ = false;
|
waiting_for_key_frame_ = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ class VCMJitterBuffer {
|
|||||||
// Enable/disable decoding with errors.
|
// Enable/disable decoding with errors.
|
||||||
void DecodeWithErrors(bool enable) {decode_with_errors_ = enable;}
|
void DecodeWithErrors(bool enable) {decode_with_errors_ = enable;}
|
||||||
int64_t LastDecodedTimestamp() const;
|
int64_t LastDecodedTimestamp() const;
|
||||||
|
bool decode_with_errors() const {return decode_with_errors_;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class SequenceNumberLessThan {
|
class SequenceNumberLessThan {
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ VCMEncodedFrame* VCMReceiver::FrameForRendering(uint16_t max_wait_time_ms,
|
|||||||
// Get a complete frame if possible.
|
// Get a complete frame if possible.
|
||||||
VCMEncodedFrame* frame = jitter_buffer_.GetCompleteFrameForDecoding(0);
|
VCMEncodedFrame* frame = jitter_buffer_.GetCompleteFrameForDecoding(0);
|
||||||
|
|
||||||
if (frame == NULL) {
|
if (frame == NULL && jitter_buffer_.decode_with_errors()) {
|
||||||
// Get an incomplete frame.
|
// Get an incomplete frame.
|
||||||
const bool dual_receiver_enabled_and_passive = (dual_receiver != NULL &&
|
const bool dual_receiver_enabled_and_passive = (dual_receiver != NULL &&
|
||||||
dual_receiver->State() == kPassive &&
|
dual_receiver->State() == kPassive &&
|
||||||
|
|||||||
Reference in New Issue
Block a user