When building segment timelines, don't use the `mimeType` attribute of the `SegmentTemplate`'s parent node as a fallback when the parent's `id` attribute is missing. This doesn't work if the parent node is a `Period`, as it doesn't have the `mimeType` attribute, and it also generates timeline keys which are not unique if two streams of the same `mimeType` would get muxed (currently not supported). Instead, build an `ident` tuple on the `Representation` instance consisting of the ids of the parent `Period` and `AdaptationSet`, and the `Representation` itself, with its required `id` attribute. This ensures a unique key for the `timelines` dict. Then simply pass the `ident` tuple to the `SegmentTemplate.segments()` generator, similar to the `BaseURL` fixes of e684913 .
Open
4 tasks
Use the newly added `Representation.ident` for finding the same `Representation` after a manifest reload of a dynamic DASH stream. Also use the worker's `period` attribute instead of the hardcoded zero index, even though only the first period is supported.