forked from kenzuya/unshackle
fix(dash): add AdaptationSet-level BaseURL resolution
Add support for BaseURL elements at the AdaptationSet level per DASH spec. The URL resolution chain now properly follows: MPD → Period → AdaptationSet → Representation.
This commit is contained in:
@@ -297,8 +297,9 @@ class DASH:
|
|||||||
manifest_base_url = track.url
|
manifest_base_url = track.url
|
||||||
elif not re.match("^https?://", manifest_base_url, re.IGNORECASE):
|
elif not re.match("^https?://", manifest_base_url, re.IGNORECASE):
|
||||||
manifest_base_url = urljoin(track.url, f"./{manifest_base_url}")
|
manifest_base_url = urljoin(track.url, f"./{manifest_base_url}")
|
||||||
period_base_url = urljoin(manifest_base_url, period.findtext("BaseURL"))
|
period_base_url = urljoin(manifest_base_url, period.findtext("BaseURL") or "")
|
||||||
rep_base_url = urljoin(period_base_url, representation.findtext("BaseURL"))
|
adaptation_set_base_url = urljoin(period_base_url, adaptation_set.findtext("BaseURL") or "")
|
||||||
|
rep_base_url = urljoin(adaptation_set_base_url, representation.findtext("BaseURL") or "")
|
||||||
|
|
||||||
period_duration = period.get("duration") or manifest.get("mediaPresentationDuration")
|
period_duration = period.get("duration") or manifest.get("mediaPresentationDuration")
|
||||||
init_data: Optional[bytes] = None
|
init_data: Optional[bytes] = None
|
||||||
|
|||||||
Reference in New Issue
Block a user