Endocarditis is the infection of the heart valves and/or inside lining of the heart. In most cases, the infection involves bacteria, but a fungus may also be responsible. The disease typically occurs in dogs, especially mid-size to larger breeds, and is rare in cats. Male dogs are most commonly affected.