Skip to main content

Module limits

Module limits 

Source
Expand description

Hostile-input bounds for MPD parsing and segment expansion.

An MPD is fetched from a server the player does not control, so every dimension of it that costs memory or CPU has a named ceiling and a typed error (crate::error::MpdError::TooLarge) instead of an allocation.

Structs§

Limits
The bounds applied by crate::mpd::Mpd::parse_with; Default is the MAX_* constants above.

Constants§

MAX_ADAPTATION_SETS_PER_PERIOD
Most AdaptationSet elements accepted in one Period.
MAX_ATTRIBUTES_PER_ELEMENT
Most attributes accepted on one element.
MAX_ATTRIBUTE_BYTES
Longest single attribute value accepted, in bytes.
MAX_BASE_CANDIDATES
Most candidate base locations kept when BaseURL alternates are combined across levels.
MAX_BASE_URLS_PER_LEVEL
Most BaseURL alternates accepted on one level.
MAX_MPD_BYTES
Largest MPD document accepted, in bytes.
MAX_PERIODS
Most Period elements accepted.
MAX_REPRESENTATIONS_PER_SET
Most Representation elements accepted in one AdaptationSet.
MAX_SEGMENT_URLS
Most SegmentURL entries accepted in one SegmentList.
MAX_TIMELINE_ENTRIES
Most S entries accepted in one SegmentTimeline.
MAX_TIMELINE_SEGMENTS
Most Media Segments one SegmentTimeline may describe once @r is expanded. The expansion is lazy (run table, never one entry per segment), so this bounds the arithmetic, not the memory.
MAX_XML_DEPTH
Deepest element nesting accepted.
MAX_XML_ELEMENTS
Most elements (of any namespace) accepted in one document.