| Index: video/video_receive_stream.cc
|
| diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
|
| index 7de42f8a1da8dd6f1310f21c2034c655dff1a6ba..891c78e7ec7cd13f75bcc09f19896cda8ad1bc1b 100644
|
| --- a/video/video_receive_stream.cc
|
| +++ b/video/video_receive_stream.cc
|
| @@ -410,16 +410,19 @@ bool VideoReceiveStream::Decode() {
|
| }
|
|
|
| if (frame) {
|
| + int64_t now_ms = clock_->TimeInMilliseconds();
|
| RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kFrameFound);
|
| if (video_receiver_.Decode(frame.get()) == VCM_OK) {
|
| keyframe_required_ = false;
|
| frame_decoded_ = true;
|
| rtp_video_stream_receiver_.FrameDecoded(frame->picture_id);
|
| - } else if (!keyframe_required_ || !frame_decoded_) {
|
| + } else if (!frame_decoded_ || !keyframe_required_ ||
|
| + (last_keyframe_request_ms_ + kMaxWaitForKeyFrameMs < now_ms)) {
|
| keyframe_required_ = true;
|
| // TODO(philipel): Remove this keyframe request when downstream project
|
| // has been fixed.
|
| RequestKeyFrame();
|
| + last_keyframe_request_ms_ = now_ms;
|
| }
|
| } else {
|
| RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kTimeout);
|
|
|