diff --git a/media/engine/webrtc_video_engine.cc b/media/engine/webrtc_video_engine.cc index bf086e66cf..af5d0c7fe9 100644 --- a/media/engine/webrtc_video_engine.cc +++ b/media/engine/webrtc_video_engine.cc @@ -193,13 +193,9 @@ std::vector GetPayloadTypesAndDefaultCodecs( supported_formats.push_back(webrtc::SdpVideoFormat(kRedCodecName)); supported_formats.push_back(webrtc::SdpVideoFormat(kUlpfecCodecName)); - // flexfec-03 is supported as - // - receive codec unless WebRTC-FlexFEC-03-Advertised is disabled - // - send codec if WebRTC-FlexFEC-03-Advertised is enabled - if ((is_decoder_factory && - !IsDisabled(trials, "WebRTC-FlexFEC-03-Advertised")) || - (!is_decoder_factory && - IsEnabled(trials, "WebRTC-FlexFEC-03-Advertised"))) { + // flexfec-03 is always supported as receive codec and as send codec + // only if WebRTC-FlexFEC-03-Advertised is enabled + if (is_decoder_factory || IsEnabled(trials, "WebRTC-FlexFEC-03-Advertised")) { webrtc::SdpVideoFormat flexfec_format(kFlexfecCodecName); // This value is currently arbitrarily set to 10 seconds. (The unit // is microseconds.) This parameter MUST be present in the SDP, but diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc index 032a801a0c..aa59ce4d8d 100644 --- a/media/engine/webrtc_video_engine_unittest.cc +++ b/media/engine/webrtc_video_engine_unittest.cc @@ -1212,20 +1212,6 @@ TEST_F(WebRtcVideoEngineTest, Flexfec03SendCodecEnablesWithFieldTrial) { EXPECT_THAT(engine_.send_codecs(), Contains(flexfec)); } -// Test that FlexFEC is supported as a receive video codec by default. -// Disabling field trial should prevent advertising FlexFEC receive codec. -TEST_F(WebRtcVideoEngineTest, Flexfec03ReceiveCodecDisablesWithFieldTrial) { - decoder_factory_->AddSupportedVideoCodecType("VP8"); - - auto flexfec = Field("name", &VideoCodec::name, "flexfec-03"); - - EXPECT_THAT(engine_.recv_codecs(), Contains(flexfec)); - - webrtc::test::ScopedKeyValueConfig override_field_trials( - field_trials_, "WebRTC-FlexFEC-03-Advertised/Disabled/"); - EXPECT_THAT(engine_.recv_codecs(), Not(Contains(flexfec))); -} - // Test that the FlexFEC "codec" gets assigned to the lower payload type range TEST_F(WebRtcVideoEngineTest, Flexfec03LowerPayloadTypeRange) { encoder_factory_->AddSupportedVideoCodecType("VP8");