1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-12-23 12:30:29 +00:00

fix rfc8216_8-7.m3u8 parsing bug

This commit is contained in:
Ian Jun 2019-11-28 06:30:12 +00:00
parent ebddb7a0e2
commit 91ca70687b

View file

@ -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(),
);
}