rutgersc / m3u8-rs

m3u8 parser for rust
MIT License
99 stars 27 forks source link

Allowing empty comments #69

Closed vagetman closed 11 months ago

vagetman commented 11 months ago

https://datatracker.ietf.org/doc/html/rfc8216#section-4.1

Lines that start with the character '#' are either comments or tags.
   Tags begin with #EXT.  They are case sensitive.  All other lines that
   begin with '#' are comments and SHOULD be ignored.

We're currently only recognizing comments with a text in them. When a comment has no text (empty), it becomes an issue. eg

#EXTM3U
# Created with Bento4 mp4-dash.py, VERSION=2.0.0-640
#

the 2nd line is processed fine. the 3rd line though is not matching as a comment in fn comment_tag() and is ingested as if it was a segment URI with 0 duration.

This PR is addressing the issue

vagetman commented 11 months ago

@sdroege hey, do you mind merging and publishing as a new version please? thanks!

sdroege commented 11 months ago

Sure, I'll publish later or tomorrow. I didn't merge it some days ago because it was still marked as draft :)

sdroege commented 11 months ago

Done!