Index: webrtc/video/video_receive_stream.cc |
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc |
index 52da09a82df4444d7401a28703a7161980ed34f0..e8a9da22455c7a79d9b2948071347103987496f7 100644 |
--- a/webrtc/video/video_receive_stream.cc |
+++ b/webrtc/video/video_receive_stream.cc |
@@ -491,12 +491,9 @@ |
bool VideoReceiveStream::Decode() { |
TRACE_EVENT0("webrtc", "VideoReceiveStream::Decode"); |
static const int kMaxWaitForFrameMs = 3000; |
- static const int kMaxWaitForKeyFrameMs = 200; |
- |
- int wait_ms = keyframe_required_ ? kMaxWaitForKeyFrameMs : kMaxWaitForFrameMs; |
std::unique_ptr<video_coding::FrameObject> frame; |
video_coding::FrameBuffer::ReturnReason res = |
- frame_buffer_->NextFrame(wait_ms, &frame, keyframe_required_); |
+ frame_buffer_->NextFrame(kMaxWaitForFrameMs, &frame); |
if (res == video_coding::FrameBuffer::ReturnReason::kStopped) { |
video_receiver_.DecodingStopped(); |
@@ -505,12 +502,8 @@ |
if (frame) { |
RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kFrameFound); |
- if (video_receiver_.Decode(frame.get()) == VCM_OK) { |
- keyframe_required_ = false; |
+ if (video_receiver_.Decode(frame.get()) == VCM_OK) |
rtp_video_stream_receiver_.FrameDecoded(frame->picture_id); |
- } else { |
- keyframe_required_ = true; |
- } |
} else { |
RTC_DCHECK_EQ(res, video_coding::FrameBuffer::ReturnReason::kTimeout); |
int64_t now_ms = clock_->TimeInMilliseconds(); |
@@ -531,7 +524,7 @@ |
now_ms - *last_keyframe_packet_ms < kMaxWaitForFrameMs; |
if (stream_is_active && !receiving_keyframe) { |
- LOG(LS_WARNING) << "No decodable frame in " << wait_ms |
+ LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs |
<< " ms, requesting keyframe."; |
RequestKeyFrame(); |
} |