iheartradio / open-m3u8

Open Source m3u8 Parser
Other
248 stars 94 forks source link

Handle end of playlist properly #8

Closed Wopple closed 9 years ago

Wopple commented 9 years ago

The specification has an EXT-X-ENDLIST tag which delimits the end of a playlist. The parser should stop reading from the InputStream when this tag is detected and return the parsed playlist.

In both cases of EXT-X-ENDLIST or reaching the end of the InputStream, the parser should not close the InputStream. This is to support reading multiple playlists from a single stream and to not violate the principle of least astonishment.