diff --git a/webrtc/modules/video_coding/main/source/video_coding_impl.h b/webrtc/modules/video_coding/main/source/video_coding_impl.h index 13cb7b6865..2390c51ca7 100644 --- a/webrtc/modules/video_coding/main/source/video_coding_impl.h +++ b/webrtc/modules/video_coding/main/source/video_coding_impl.h @@ -113,7 +113,7 @@ public: uint8_t lossRate, uint32_t rtt); - // Set recieve channel parameters + // Set receive channel parameters. virtual int32_t SetReceiveChannelParameters(uint32_t rtt); // Register a transport callback which will be called to deliver the diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc index 71847779e0..874db7c4c6 100644 --- a/webrtc/video_engine/vie_channel.cc +++ b/webrtc/video_engine/vie_channel.cc @@ -575,7 +575,7 @@ int32_t ViEChannel::WaitForKeyFrame(bool wait) { } int32_t ViEChannel::SetSignalPacketLossStatus(bool enable, - bool only_key_frames) { + bool only_key_frames) { WEBRTC_TRACE(kTraceInfo, kTraceVideo, ViEId(engine_id_, channel_id_), "%s(enable: %d)", __FUNCTION__, enable); if (enable) { @@ -681,6 +681,8 @@ int32_t ViEChannel::ProcessNACKRequest(const bool enable) { rtp_rtcp->SetNACKStatus(nackMethod, max_nack_reordering_threshold_); rtp_rtcp->SetStorePacketsStatus(true, nack_history_size_sender_); } + // Don't introduce errors when NACK is enabled. + vcm_.SetDecodeErrorMode(kNoErrors); } else { CriticalSectionScoped cs(rtp_rtcp_cs_.get()); for (std::list::iterator it = simulcast_rtp_rtcp_.begin(); @@ -702,6 +704,9 @@ int32_t ViEChannel::ProcessNACKRequest(const bool enable) { "%s: Could not turn off NACK", __FUNCTION__); return -1; } + // When NACK is off, allow decoding with errors. Otherwise, the video + // will freeze, and will only recover with a complete key frame. + vcm_.SetDecodeErrorMode(kWithErrors); } return 0; }