Backport revisions 4554 and 4556 from upstream, which allows changing the media type in a new SDP offer.