Factorize out common code for opening of the RTP parsing context between