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

Correctly decode a Media manifest with BYTERANGE #51

Merged
merged 1 commit into from
May 5, 2016
Merged

Correctly decode a Media manifest with BYTERANGE #51

merged 1 commit into from
May 5, 2016

Conversation

bradleyfalzon
Copy link
Collaborator

@bradleyfalzon bradleyfalzon commented May 4, 2016

decodeLineOfMediaPlaylist currently expects a playlist to have
either a EXTINF or a EXT-X-BYTERANGE because it's using an
if EXTINF {} else if EXT-X-BYTERANGE {}, this is incorrect as
EXTINF is required and therefore a playlist must always have
an EXTINF, the EXT-X-BYTERANGE is optional.

This change also fixes a bug when an offset given in EXT-X-BYTERANGE
does not reset its state, so segments without an offset would
incorrectly be given the offset of a previous segment.

Also includes unit tests to reproduce the issue.

Fixes #46

decodeLineOfMediaPlaylist currently expects a playlist to have
*either* a EXTINF or a EXT-X-BYTERANGE because it's using an
if EXTINF {} else if EXT-X-BYTERANGE {}, this is incorrect as
EXTINF is required and therefore a playlist must always have
an EXTINF, the EXT-X-BYTERANGE is optional.

This change also fixes a bug when an offset given in EXT-X-BYTERANGE
is not reset in its state, so segments without an offset would
incorrect be given the last offset set.

Also includes unit tests to reproduce the issue.
@bradleyfalzon
Copy link
Collaborator Author

@AyliD can you also check over this PR and verify it resolves your issue?

@AyliD
Copy link

AyliD commented May 4, 2016

@bradleyfalzon you are an angel, seems like the fix i made and working well for me (but i didnt write any unitesting) so thank you!

@bradleyfalzon
Copy link
Collaborator Author

Thanks for the issue and fixes, unless urgent I'll leave these around for 24hrs and let @grafov make any further suggestions/clarifications before merging.

@grafov grafov added the bug label May 5, 2016
@grafov
Copy link
Owner

grafov commented May 5, 2016

@AyliD thank you for explaining the problem!
@bradleyfalzon I think fix is ok, let merge it.

@bradleyfalzon bradleyfalzon merged commit 6c250ac into grafov:master May 5, 2016
@bradleyfalzon bradleyfalzon deleted the 46-range branch May 5, 2016 22:45
@grafov grafov removed the in progress label May 5, 2016
grafov pushed a commit that referenced this pull request Nov 22, 2016
decodeLineOfMediaPlaylist currently expects a playlist to have
*either* a EXTINF or a EXT-X-BYTERANGE because it's using an
if EXTINF {} else if EXT-X-BYTERANGE {}, this is incorrect as
EXTINF is required and therefore a playlist must always have
an EXTINF, the EXT-X-BYTERANGE is optional.

This change also fixes a bug when an offset given in EXT-X-BYTERANGE
is not reset in its state, so segments without an offset would
incorrect be given the last offset set.

Also includes unit tests to reproduce the issue.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues related to iframe playlist and bytes ranges
3 participants