Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on #EXT-X-MEDIA-TIME tag #22

Closed
ost12666 opened this issue May 15, 2017 · 3 comments · Fixed by #156
Closed

Exception on #EXT-X-MEDIA-TIME tag #22

ost12666 opened this issue May 15, 2017 · 3 comments · Fixed by #156

Comments

@ost12666
Copy link

ost12666 commented May 15, 2017

We have a vtt playlist with non standard #EXT-X-MEDIA-TIME tag:

#EXT-X-MEDIA-TIME:0.0

The parser then tries to parse the attributes from "-TIME:0.0" probably because it somehow detects this as the #EXT-X-MEDIA tag.

This causes this exception here: attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1);

Exception has occurred: TypeError
TypeError: Cannot read property 'slice' of null
at parseAttributes (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/parse-stream.js:60:41)
at ParseStream.push (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/parse-stream.js:339:30)
at LineStream. (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/stream.js:124:21)
at LineStream.trigger (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/stream.js:91:24)
at LineStream.push (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/line-stream.js:59:14)
at Parser.push (/Users/ost/Development/adaptive_playground/Server/node_modules/m3u8-parser/es5/parser.js:370:23)

Probably because of the unneeded '?' after the ':'

  match = /^#EXT-X-MEDIA:?(.*)$/.exec(line);
@ost12666 ost12666 closed this as completed Feb 2, 2018
@ost12666 ost12666 reopened this Feb 2, 2018
@ost12666
Copy link
Author

ost12666 commented Feb 2, 2018

This still happens

@ost12666
Copy link
Author

ost12666 commented Aug 3, 2018

Can someone review and merge this simple PR? #45

Thanks!

@ost12666
Copy link
Author

ost12666 commented Aug 6, 2018

Fixed here: #50

@Essk Essk closed this as completed in #156 Sep 27, 2022
Essk added a commit that referenced this issue Sep 27, 2022
Prevent non-standard tags from being erroneously matched as standard tags by enforcing the colon tag delimiter

BREAKING CHANGE: Missing colon (:) tag delimiters are no longer supported
Closes #22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant