Skip to content

Conversation

@mjneil
Copy link
Contributor

@mjneil mjneil commented Dec 13, 2019

In ISO/IEC 23009-1:2014(E) Section 5.3.2.1

If (i) @start attribute is absent, and (ii) the previous Period element does not contains a @duration attribute or the Period element is the first in the MPD, and (iii) the MPD@type is 'dynamic', then this Period is an Early Available Period (see below for details).

Since Period.Start is not a pointer and has omitempty a start of PT0S for the first period was not being written into the mpd. This is causing parsing errors in dynamic manifests because Dashjs and Exo Player treat it as an Early Available Period.

I did not think removing omitempty was the right call here because Period@start is an optional attribute, however, sometimes we need the value to be 0, so I changed Period.Start to be a pointer so we can omit empty when the pointer is nil. i understand this is a breaking change so I'm open to other suggestions if we want to do this in a more backwards compatible way.

@mjneil mjneil merged commit 34ac3a6 into master Dec 13, 2019
@mjneil mjneil deleted the period-start branch December 13, 2019 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants