diff --git a/trunk/src/app/srs_app_rtc_jitbuffer.cpp b/trunk/src/app/srs_app_rtc_jitbuffer.cpp index 40a1b6fbd..2824d4fee 100644 --- a/trunk/src/app/srs_app_rtc_jitbuffer.cpp +++ b/trunk/src/app/srs_app_rtc_jitbuffer.cpp @@ -1201,7 +1201,7 @@ SrsRtpFrameBufferEnum SrsRtpJitterBuffer::InsertPacket(uint16_t seq, uint32_t ts //CountFrame(*frame); // if (previous_state != kStateDecodable && // previous_state != kStateComplete) { - // /*CountFrame(*frame);*/ //????????????????????�?? by ylr + // /*CountFrame(*frame); // if (continuous) { // // Signal that we have a complete session. // frame_event_->Set(); @@ -1213,7 +1213,7 @@ SrsRtpFrameBufferEnum SrsRtpJitterBuffer::InsertPacket(uint16_t seq, uint32_t ts case kDecodableSession: { // *retransmitted = (frame->GetNackCount() > 0); - if (true || continuous) { + if (continuous) { decodable_frames_.InsertFrame(frame); FindAndInsertContinuousFrames(*frame); } else { @@ -1522,7 +1522,9 @@ bool SrsRtpJitterBuffer::NextMaybeIncompleteTimestamp(uint32_t* timestamp) SrsRtpFrameBuffer* oldest_frame; if (decodable_frames_.empty()) { - if (incomplete_frames_.size() <= 1) { + //in order to solve the problem of bad network, we can wait for more incomplete frames + //ex fps=15 + if (incomplete_frames_.size() < 15) { return false; }