mirror of
https://github.com/rutgersc/m3u8-rs.git
synced 2025-01-03 11:48:41 +00:00
Added "lenient" feature
This commit is contained in:
parent
4120e1c557
commit
663e0607cf
2 changed files with 2 additions and 0 deletions
|
@ -16,4 +16,5 @@ chrono = { version = "0.4", default-features = false, features = [ "std" ] }
|
|||
[features]
|
||||
default = ["parser"]
|
||||
parser = ["nom"]
|
||||
lenient = []
|
||||
|
||||
|
|
|
@ -468,6 +468,7 @@ impl AlternativeMedia {
|
|||
let default = is_yes!(attrs, "DEFAULT");
|
||||
let autoselect = is_yes!(attrs, "AUTOSELECT");
|
||||
|
||||
#[cfg(feature = "lenient")]
|
||||
if media_type != AlternativeMediaType::Subtitles && attrs.contains_key("FORCED") {
|
||||
return Err(String::from(
|
||||
"FORCED attribute must not be included in non-SUBTITLE Alternative Medias",
|
||||
|
|
Loading…
Reference in a new issue