From 91ca70687bd4fd241938d9efcb60d9503f16cbee Mon Sep 17 00:00:00 2001 From: Ian Jun Date: Thu, 28 Nov 2019 06:30:12 +0000 Subject: [PATCH] fix rfc8216_8-7.m3u8 parsing bug --- src/tags/master_playlist/media.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tags/master_playlist/media.rs b/src/tags/master_playlist/media.rs index 8358609..7178f18 100644 --- a/src/tags/master_playlist/media.rs +++ b/src/tags/master_playlist/media.rs @@ -126,9 +126,10 @@ impl ExtXMediaBuilder { return Err(Error::unexpected_attribute("INSTREAM-ID").to_string()); } - if self.is_default.unwrap_or(false) && !self.is_autoselect.unwrap_or(false) { + if self.is_default.unwrap_or(false) && !self.is_autoselect.unwrap_or(true) { return Err( - Error::custom("If `DEFAULT` is true, `AUTOSELECT` has to be true too!").to_string(), + Error::custom("If `DEFAULT` is true and `AUTOSELECT` is present, \ + `AUTOSELECT` has to be true too!").to_string(), ); }