Update to m3u8-rs 4.0

This commit is contained in:
Sebastian Dröge 2022-04-14 09:52:39 +03:00
parent 76043141fc
commit f637c4a65d
3 changed files with 4 additions and 7 deletions

View file

@ -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]

View file

@ -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();

View file

@ -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.