1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-06-18 04:40:33 +00:00

fixed floating ad pod duration value

This commit is contained in:
Dmitry Kasimtsev 2018-11-14 13:43:29 +02:00
parent cd5868e705
commit 405d71ea33

View file

@ -373,10 +373,9 @@ impl FromStr for ExtXCueOut {
type Err = Error;
fn from_str(s: &str) -> Result<Self> {
track_assert!(s.starts_with(Self::PREFIX), ErrorKind::InvalidInput);
let duration = may_invalid!(s.split_at(Self::PREFIX.len()).1.parse())?;
Ok(ExtXCueOut {
duration: Duration::from_secs(duration),
})
let seconds: DecimalFloatingPoint = may_invalid!(s.split_at(Self::PREFIX.len()).1.parse())?;
let duration = seconds.to_duration();
Ok(ExtXCueOut { duration })
}
}
///CUE-IN