diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /third_party/libwebrtc/pc/rtp_transceiver.cc | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/rtp_transceiver.cc')
-rw-r--r-- | third_party/libwebrtc/pc/rtp_transceiver.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/third_party/libwebrtc/pc/rtp_transceiver.cc b/third_party/libwebrtc/pc/rtp_transceiver.cc index ca626cc94b..34d744a3bb 100644 --- a/third_party/libwebrtc/pc/rtp_transceiver.cc +++ b/third_party/libwebrtc/pc/rtp_transceiver.cc @@ -51,9 +51,7 @@ RTCError VerifyCodecPreferences( // transceiver.direction. if (!absl::c_any_of(codecs, [&recv_codecs](const RtpCodecCapability& codec) { - return codec.name != cricket::kRtxCodecName && - codec.name != cricket::kRedCodecName && - codec.name != cricket::kFlexfecCodecName && + return codec.IsMediaCodec() && absl::c_any_of(recv_codecs, [&codec](const cricket::Codec& recv_codec) { return recv_codec.MatchesRtpCodec(codec); @@ -65,9 +63,7 @@ RTCError VerifyCodecPreferences( } if (!absl::c_any_of(codecs, [&send_codecs](const RtpCodecCapability& codec) { - return codec.name != cricket::kRtxCodecName && - codec.name != cricket::kRedCodecName && - codec.name != cricket::kFlexfecCodecName && + return codec.IsMediaCodec() && absl::c_any_of(send_codecs, [&codec](const cricket::Codec& send_codec) { return send_codec.MatchesRtpCodec(codec); @@ -101,11 +97,9 @@ RTCError VerifyCodecPreferences( } } - // Check we have a real codec (not just rtx, red or fec) + // Check we have a real codec (not just rtx, red, fec or CN) if (absl::c_all_of(codecs, [](const RtpCodecCapability& codec) { - return codec.name == cricket::kRtxCodecName || - codec.name == cricket::kRedCodecName || - codec.name == cricket::kUlpfecCodecName; + return !codec.IsMediaCodec(); })) { LOG_AND_RETURN_ERROR( RTCErrorType::INVALID_MODIFICATION, |