mirror of
https://github.com/sile/hls_m3u8.git
synced 2024-11-22 07:10:59 +00:00
Fix handling of BYTERANGE
attribute
This commit is contained in:
parent
2b5a79b648
commit
0b04431d49
1 changed files with 5 additions and 2 deletions
|
@ -264,7 +264,7 @@ impl fmt::Display for ExtXMap {
|
|||
write!(f, "{}", Self::PREFIX)?;
|
||||
write!(f, "URI={}", self.uri)?;
|
||||
if let Some(ref x) = self.range {
|
||||
write!(f, ",BYTERANGE={}", x)?;
|
||||
write!(f, ",BYTERANGE=\"{}\"", x)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -281,7 +281,10 @@ impl FromStr for ExtXMap {
|
|||
let (key, value) = track!(attr)?;
|
||||
match key {
|
||||
"URI" => uri = Some(track!(value.parse())?),
|
||||
"BYTERANGE" => range = Some(track!(value.parse())?),
|
||||
"BYTERANGE" => {
|
||||
let s: QuotedString = track!(value.parse())?;
|
||||
range = Some(track!(s.parse())?);
|
||||
}
|
||||
_ => {
|
||||
// [6.3.1. General Client Responsibilities]
|
||||
// > ignore any attribute/value pair with an unrecognized AttributeName.
|
||||
|
|
Loading…
Reference in a new issue