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

Ignore blank lines in playlist -- fixes panic w/EXT-X-MAP. #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ejohnst
Copy link

@ejohnst ejohnst commented Dec 22, 2021

reader.go panics if there's a blank line between the header containing EXT-X-MAP and the first segment for FMP4 media playlists. (It tries to add MAP to the first segment, which it hasn't created yet.)

Patch fixes this by ignoring blank lines; reader_test.go updated to work with change (one of the tests assumed prior behavior).

@eric confirms this is consistent with the standard:

Lines in a Playlist file are terminated by either a single line feed
character or a carriage return character followed by a line feed
character. Each line is a URI, is blank, or starts with the
character '#'. Blank lines are ignored. Whitespace MUST NOT be
present, except for elements in which it is explicitly specified.

Issue seems to have been previously reported as #166.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant