1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-06-26 16:30:34 +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; type Err = Error;
fn from_str(s: &str) -> Result<Self> { fn from_str(s: &str) -> Result<Self> {
track_assert!(s.starts_with(Self::PREFIX), ErrorKind::InvalidInput); track_assert!(s.starts_with(Self::PREFIX), ErrorKind::InvalidInput);
let duration = may_invalid!(s.split_at(Self::PREFIX.len()).1.parse())?; let seconds: DecimalFloatingPoint = may_invalid!(s.split_at(Self::PREFIX.len()).1.parse())?;
Ok(ExtXCueOut { let duration = seconds.to_duration();
duration: Duration::from_secs(duration), Ok(ExtXCueOut { duration })
})
} }
} }
///CUE-IN ///CUE-IN