Source code

Revision control

Copy as Markdown

Other Tools

From: Michael Froman <mfroman@mozilla.com>
Date: Fri, 8 Aug 2025 15:58:00 -0500
Subject: Bug 1980479 - (fix-bf70c05a1a) fixes for c++20 support
---
api/video_codecs/h264_profile_level_id.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/api/video_codecs/h264_profile_level_id.cc b/api/video_codecs/h264_profile_level_id.cc
index 4dafda078f..0bdaed7fd3 100644
--- a/api/video_codecs/h264_profile_level_id.cc
+++ b/api/video_codecs/h264_profile_level_id.cc
@@ -18,6 +18,7 @@
#include <string>
#include "api/rtp_parameters.h"
+#include "rtc_base/arraysize.h"
namespace webrtc {
@@ -165,7 +166,7 @@ std::optional<H264Level> H264SupportedLevel(int max_frame_pixel_count,
float max_fps) {
static const int kPixelsPerMacroblock = 16 * 16;
- for (int i = std::ssize(kLevelConstraints) - 1; i >= 0; --i) {
+ for (int i = arraysize(kLevelConstraints) - 1; i >= 0; --i) {
const LevelConstraint& level_constraint = kLevelConstraints[i];
if (level_constraint.max_macroblock_frame_size * kPixelsPerMacroblock <=
max_frame_pixel_count &&