diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-04-14 09:52:39 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-04-26 14:10:05 +0300 |
commit | f637c4a65da58acb2eb0a7d22f8878dbb6b5d244 (patch) | |
tree | fef14d5d6a22238a43d7f1de32843f76f4960bac /net | |
parent | 76043141fcfbfed1b80ac4a3874c75aac2798faa (diff) |
Update to m3u8-rs 4.0
Diffstat (limited to 'net')
-rw-r--r-- | net/hlssink3/Cargo.toml | 2 | ||||
-rw-r--r-- | net/hlssink3/src/imp.rs | 5 | ||||
-rw-r--r-- | net/hlssink3/src/playlist.rs | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/net/hlssink3/Cargo.toml b/net/hlssink3/Cargo.toml index 63ce0c38..66a560cb 100644 --- a/net/hlssink3/Cargo.toml +++ b/net/hlssink3/Cargo.toml @@ -14,7 +14,7 @@ gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/g glib = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.15", version = "0.15" } gio = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.15", version = "0.15" } once_cell = "1.7.2" -m3u8-rs = "3" +m3u8-rs = "4.0" regex = "1" [dev-dependencies] diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs index 44021465..85f015e9 100644 --- a/net/hlssink3/src/imp.rs +++ b/net/hlssink3/src/imp.rs @@ -125,10 +125,7 @@ impl HlsSink3 { let (target_duration, playlist_type) = { let settings = self.settings.lock().unwrap(); - ( - settings.target_duration as f32, - settings.playlist_type.clone(), - ) + (settings.target_duration as f32, settings.playlist_type) }; let mut state = self.state.lock().unwrap(); diff --git a/net/hlssink3/src/playlist.rs b/net/hlssink3/src/playlist.rs index 40ca4b18..3dbb3055 100644 --- a/net/hlssink3/src/playlist.rs +++ b/net/hlssink3/src/playlist.rs @@ -24,7 +24,7 @@ static SEGMENT_IDX_PATTERN: Lazy<regex::Regex> = Lazy::new(|| Regex::new(r"(%0(\ #[derive(Debug, Clone)] pub struct Playlist { inner: MediaPlaylist, - playlist_index: i32, + playlist_index: u64, status: PlaylistRenderState, turn_vod: bool, } @@ -94,7 +94,7 @@ impl Playlist { } self.playlist_index += 1; - self.inner.media_sequence = self.playlist_index as i32 - self.inner.segments.len() as i32; + self.inner.media_sequence = self.playlist_index as u64 - self.inner.segments.len() as u64; } /// Sets the playlist to started state. |