Merge pull request #5 from gurry/master

Fixed a bug where #EXT-X-MEDIA-SEQUENCE tag was being interpreted as #EXT-X-MEDIA
This commit is contained in:
rutgersc 2019-04-26 19:43:36 +02:00 committed by GitHub
commit 5389f25f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,7 +225,7 @@ named!(pub is_master_playlist_tag_line(&[u8]) -> Option<(bool, String)>,
tag: opt!(alt!( tag: opt!(alt!(
map!(tag!("#EXT-X-STREAM-INF"), |t| (true, t)) map!(tag!("#EXT-X-STREAM-INF"), |t| (true, t))
| map!(tag!("#EXT-X-I-FRAME-STREAM-INF"), |t| (true, t)) | map!(tag!("#EXT-X-I-FRAME-STREAM-INF"), |t| (true, t))
| map!(tag!("#EXT-X-MEDIA"), |t| (true, t)) | map!(terminated!(tag!("#EXT-X-MEDIA"), is_not!("-")), |t| (true, t)) // terminated!() to prevent matching with #EXT-X-MEDIA-SEQUENCE for which we have a separate pattern below
| map!(tag!("#EXT-X-SESSION-KEY"), |t| (true, t)) | map!(tag!("#EXT-X-SESSION-KEY"), |t| (true, t))
| map!(tag!("#EXT-X-SESSION-DATA"), |t| (true, t)) | map!(tag!("#EXT-X-SESSION-DATA"), |t| (true, t))