diff --git a/video/video_stream_encoder_unittest.cc b/video/video_stream_encoder_unittest.cc index 10ec97c124..2b7399de12 100644 --- a/video/video_stream_encoder_unittest.cc +++ b/video/video_stream_encoder_unittest.cc @@ -8996,31 +8996,8 @@ std::string TestParametersVideoCodecAndAllowI420ConversionToString( testing::TestParamInfo> info) { VideoCodecType codec_type = std::get<0>(info.param); bool allow_i420_conversion = std::get<1>(info.param); - std::string str; - switch (codec_type) { - case kVideoCodecGeneric: - str = "Generic"; - break; - case kVideoCodecVP8: - str = "VP8"; - break; - case kVideoCodecVP9: - str = "VP9"; - break; - case kVideoCodecAV1: - str = "AV1"; - break; - case kVideoCodecH264: - str = "H264"; - break; - case kVideoCodecMultiplex: - str = "Multiplex"; - break; - default: - RTC_DCHECK_NOTREACHED(); - } - str += allow_i420_conversion ? "_AllowToI420" : "_DisallowToI420"; - return str; + return std::string(CodecTypeToPayloadString(codec_type)) + + (allow_i420_conversion ? "_AllowToI420" : "_DisallowToI420"); } constexpr std::pair kVP8DisallowConversion =