From 5f5f11cc8bf86de2e6ccf32eef1fe9f7c8e6c924 Mon Sep 17 00:00:00 2001 From: pbos Date: Thu, 30 Jul 2015 05:44:17 -0700 Subject: [PATCH] FEC protect H264 delta frames as well. BUG=webrtc:4800 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1266593003 Cr-Commit-Position: refs/heads/master@{#9662} --- webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc | 3 +-- webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc index 8849732157..d8063b03f1 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc @@ -332,8 +332,7 @@ void RtpPacketizerH264::NextFragmentPacket(uint8_t* buffer, } ProtectionType RtpPacketizerH264::GetProtectionType() { - return (frame_type_ == kVideoFrameKey) ? kProtectedPacket - : kUnprotectedPacket; + return kProtectedPacket; } StorageType RtpPacketizerH264::GetStorageType( diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc index 1dc799968d..19c82623c6 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc @@ -234,16 +234,16 @@ ProtectionType RtpPacketizerVp8::GetProtectionType() { } StorageType RtpPacketizerVp8::GetStorageType(uint32_t retransmission_settings) { - StorageType storage = kAllowRetransmission; if (hdr_info_.temporalIdx == 0 && !(retransmission_settings & kRetransmitBaseLayer)) { - storage = kDontRetransmit; - } else if (hdr_info_.temporalIdx != kNoTemporalIdx && + return kDontRetransmit; + } + if (hdr_info_.temporalIdx != kNoTemporalIdx && hdr_info_.temporalIdx > 0 && !(retransmission_settings & kRetransmitHigherLayers)) { - storage = kDontRetransmit; + return kDontRetransmit; } - return storage; + return kAllowRetransmission; } std::string RtpPacketizerVp8::ToString() {