Decode the compact one-byte element header
02Four ID bits and four length bits describe a small element. The length nibble encodes the data length minus one.
Separate error cases terminate extension processing and ignore the marker length. Only earlier elements SHOULD be considered; outer payload offset remains unchanged.
Source for this drawing: RFC 8285 · Read RFC section 4.2 ↗
New to this? Start hereA quick picture + helpful background
Finding a route and sending media are separate jobs.
Some messages set up a conversation or discover a reachable address. Other packets carry the audio or video. Follow those jobs separately.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Zero length bits mean one data octet; zero padding and reserved IDs have separate meanings.
- The one-byte form MUST use outer profile 0xBEDE. Each element starts with four ID bits and four length bits. Valid IDs are 1–14. Length is data octets minus one: nibble 0 means 1 data octet and nibble 15 means 16. A zero-data-length element cannot be represented in this form (§4.2).
- The chosen header 0x30 means ID3 and length nibble 0; one data byte 7f follows. Header 0x3f instead means ID3 with 16 data bytes. The element header itself is not counted in its data length. No per-element four-byte alignment is required (§§4.1.2,4.2).
- Zero-valued bytes are padding, not ID 0 elements with one byte of data. Padding MAY appear between elements or at the end to reach the outer 32-bit boundary. A complete selected layout with data lengths 1/2/4, three element headers and two inter-element pad bytes uses 12 body octets: outer length 3 (§§4.1.2,4.2).
- ID 15 is reserved and MUST NOT be used. If encountered, ignore its length and terminate processing the entire extension; only earlier elements SHOULD be considered. Separately, an apparent ID 0 with a nonzero length field also requires termination with its length ignored (§§4.1.2,4.2). The helper keeps the earlier elements as its chosen disposition; it does not turn SHOULD into a mandatory universal discard/accept rule.
- Termination of element processing does not move the RTP payload boundary. The outer length still locates the end of the extension block; bytes after a reserved marker are not reinterpreted as media merely because element parsing stopped. Malformed body lengths stop the bounded helper before reading beyond the declared block; no new error packet is defined.
Fictional metadata values, URI names and bounded packet/signaling models. Not an RTP stack, complete SDP negotiation, live loss measurement or cryptographic implementation.
Read the RFC section ↗