mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-29 10:10:58 +00:00
Merge pull request #41 from unipro/master
fix rfc8216_8-7.m3u8 parsing bug
This commit is contained in:
commit
ae43982d0b
1 changed files with 5 additions and 6 deletions
|
@ -127,12 +127,11 @@ impl ExtXMediaBuilder {
|
||||||
return Err(Error::unexpected_attribute("INSTREAM-ID").to_string());
|
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(format!(
|
return Err(
|
||||||
"If `DEFAULT` is true, `AUTOSELECT` has to be true too, Default: {:?}, Autoselect: {:?}!",
|
Error::custom("If `DEFAULT` is true and `AUTOSELECT` is present, \
|
||||||
self.is_default, self.is_autoselect
|
`AUTOSELECT` has to be true too!").to_string(),
|
||||||
))
|
);
|
||||||
.to_string());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if media_type != MediaType::Subtitles && self.is_forced.is_some() {
|
if media_type != MediaType::Subtitles && self.is_forced.is_some() {
|
||||||
|
|
Loading…
Reference in a new issue