Fix PacketBuffer::LastReceivedKeyframePacketMs
to return time of the last receieved packet of a key frame rather than last received first packet of a key frame. To match VideoReceiveStream expectation and prevent requesting a new key frame if a large key frame is currently on the way. Bug: None Change-Id: I443a60872a3580d324f050080a9868f7b90d71a2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161730 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30084}
This commit is contained in:

committed by
Commit Bot

parent
5e9cac984f
commit
c9e532a7eb
@ -123,8 +123,11 @@ PacketBuffer::InsertResult PacketBuffer::InsertPacket(
|
||||
|
||||
int64_t now_ms = clock_->TimeInMilliseconds();
|
||||
last_received_packet_ms_ = now_ms;
|
||||
if (packet->video_header.frame_type == VideoFrameType::kVideoFrameKey)
|
||||
if (packet->video_header.frame_type == VideoFrameType::kVideoFrameKey ||
|
||||
last_received_keyframe_rtp_timestamp_ == packet->timestamp) {
|
||||
last_received_keyframe_packet_ms_ = now_ms;
|
||||
last_received_keyframe_rtp_timestamp_ = packet->timestamp;
|
||||
}
|
||||
|
||||
StoredPacket& new_entry = buffer_[index];
|
||||
new_entry.continuous = false;
|
||||
|
Reference in New Issue
Block a user