In a pivotal scene in Universal Pictures’ “Dolittle,” hitting theaters Friday, the title character—a doctor, played by Robert Downey Jr., who can converse with animals—relieves an ornery beast’s indigestion by removing debris from its rectum. Flatulence jokes ensue.

The scene was added late in the filmmaking process, one of several efforts Comcast Corp.’s Universal made to try to ensure a return on the $175 million it invested in the family-friendly movie, according to a person close to the production.

...