From ccf25fefcf147b5f5b89c4bcc6fae1f7a5ef22ef Mon Sep 17 00:00:00 2001 From: Gurinder Singh Date: Fri, 8 Mar 2019 11:22:34 +0530 Subject: [PATCH] Fixed a bug where #EXT-X-MEDIA-SEQUENCE tag was being interpreted as #EXT-X-MEDIA --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e406131..f19faf1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -225,7 +225,7 @@ named!(pub is_master_playlist_tag_line(&[u8]) -> Option<(bool, String)>, tag: opt!(alt!( map!(tag!("#EXT-X-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-DATA"), |t| (true, t))