Use simple SdpVideoFormat for AV1X in videocodec_test_fixture
This CL partly restores the changes that were introduced in
https://webrtc-review.googlesource.com/c/src/+/344681
The predefined SdpVideoFormat for AV1 causes some backwards
compatibility issues with downstream projects that are using
the preliminary codec name AV1X.
Bug: b/333007070
Change-Id: I2d4df241d47b399b0012e6095dd6c2445e60e2c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345941
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42011}
diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
index 2abeb05..a4c5045 100644
--- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
+++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc
@@ -20,6 +20,7 @@
#include <utility>
#include <vector>
+#include "absl/strings/match.h"
#include "absl/strings/str_replace.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@@ -180,7 +181,12 @@
} else if (config.codec_settings.codecType == kVideoCodecVP9) {
return SdpVideoFormat::VP9Profile0();
} else if (config.codec_settings.codecType == kVideoCodecAV1) {
- return SdpVideoFormat::AV1Profile0();
+ // Extra condition to not fallback to the default creation of
+ // SdpVideoFormat. This is needed for backwards compatibility in downstream
+ // projects that still use the preliminary codec name AV1X.
+ if (absl::EqualsIgnoreCase(config.codec_name, cricket::kAv1CodecName)) {
+ return SdpVideoFormat::AV1Profile0();
+ }
}
return SdpVideoFormat(config.codec_name);