Skip to content

make Period.Start a pointer for optional 0 value support #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2019

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.

2 participants