Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Use segment Keyformat and Keyformatversions on MediaPlaylist.Encode() #32

Merged
merged 1 commit into from
Jan 9, 2016
Merged

Use segment Keyformat and Keyformatversions on MediaPlaylist.Encode() #32

merged 1 commit into from
Jan 9, 2016

Conversation

bradleyfalzon
Copy link
Collaborator

Previously, when a segment has different encryption parameters than the
default playlist, the Encode() function uses the segment's parameters for
all parameters but Keyformat and Keyformatversions.

This change uses the segment's Keyformat and Keyformatversions when the
segments are encoded, allowing these parameters to change per segment and
not requiring a playlist to have a key set.

An Encode() at the end of the TestSetKeyForMediaPlaylist test would show a nil pointer exception, as the playlist did not have a key initialised, but the Encode() function would try and access it anyway.

Previously, when a segment has different encryption parameters than the
default playlist, the Encode() function uses the segment's parameters for
all parameters but Keyformat and Keyformatversions.

This change uses the segment's Keyformat and Keyformatversions when the
segments are encoded, allowing these parameters to change per segment and
not requiring a playlist to have a key set.
@bradleyfalzon
Copy link
Collaborator Author

Further, @sinkers was the original contributor to the code I've modified (837611c), it'd be good to get an understanding from them to know whether this behaviour was intended.

@grafov grafov self-assigned this Dec 7, 2015
@bradleyfalzon
Copy link
Collaborator Author

Any thoughts, concerns or changes you want for this?

@grafov
Copy link
Owner

grafov commented Dec 28, 2015

Very sorry for silence I'm busy on my work before NY so I can't switch to opensource projects until 2016.

@bradleyfalzon
Copy link
Collaborator Author

No problems mate, we'll maintain a separate fork until you have time.

grafov added a commit that referenced this pull request Jan 9, 2016
Use segment Keyformat and Keyformatversions on MediaPlaylist.Encode()
@grafov grafov merged commit 45b0e3f into grafov:master Jan 9, 2016
@grafov
Copy link
Owner

grafov commented Jan 9, 2016

Sorry for long delay, changes seems ok and was merged to master. Thank you for your contribution!

grafov added a commit that referenced this pull request Nov 22, 2016
Use segment Keyformat and Keyformatversions on MediaPlaylist.Encode()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants