aboutsummaryrefslogtreecommitdiff
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/Cargo.toml6
-rw-r--r--stream/src/fragment.rs2
-rw-r--r--stream/src/hls.rs2
-rw-r--r--stream/src/jhls.rs2
-rw-r--r--stream/src/webvtt.rs4
5 files changed, 8 insertions, 8 deletions
diff --git a/stream/Cargo.toml b/stream/Cargo.toml
index 2bd9f6a..c63b8d2 100644
--- a/stream/Cargo.toml
+++ b/stream/Cargo.toml
@@ -11,6 +11,6 @@ jellyremuxer = { path = "../remuxer" }
log = { workspace = true }
anyhow = { workspace = true }
-tokio = { version = "1.37.0", features = ["io-util"] }
-tokio-util = { version = "0.7.10", features = ["io", "io-util"] }
-serde_json = "1.0.115"
+tokio = { version = "1.38.0", features = ["io-util"] }
+tokio-util = { version = "0.7.11", features = ["io", "io-util"] }
+serde_json = "1.0.117"
diff --git a/stream/src/fragment.rs b/stream/src/fragment.rs
index 16bb703..1082e1c 100644
--- a/stream/src/fragment.rs
+++ b/stream/src/fragment.rs
@@ -29,7 +29,7 @@ pub async fn fragment_stream(
let n = spec.index.ok_or(anyhow!("segment index missing"))?;
let local_track = local_tracks
- .get(0)
+ .first()
.ok_or(anyhow!("track missing"))?
.to_owned();
diff --git a/stream/src/hls.rs b/stream/src/hls.rs
index b5a78ef..342cbde 100644
--- a/stream/src/hls.rs
+++ b/stream/src/hls.rs
@@ -55,7 +55,7 @@ pub async fn hls_variant_stream(
mut spec: StreamSpec,
mut b: DuplexStream,
) -> Result<()> {
- let local_track = local_tracks.get(0).ok_or(anyhow!("no track"))?.to_owned();
+ let local_track = local_tracks.first().ok_or(anyhow!("no track"))?.to_owned();
let track_index = spec.track[0];
let media_info = node.public.media.to_owned().ok_or(anyhow!("no media?"))?;
let frags = spawn_blocking(move || {
diff --git a/stream/src/jhls.rs b/stream/src/jhls.rs
index ac1a3e5..2e45378 100644
--- a/stream/src/jhls.rs
+++ b/stream/src/jhls.rs
@@ -21,7 +21,7 @@ pub async fn jhls_index(
perms: &PermissionSet,
) -> Result<()> {
let local_track = local_tracks
- .get(0)
+ .first()
.ok_or(anyhow!("track missing"))?
.to_owned();
diff --git a/stream/src/webvtt.rs b/stream/src/webvtt.rs
index b29c7c5..316e224 100644
--- a/stream/src/webvtt.rs
+++ b/stream/src/webvtt.rs
@@ -21,8 +21,8 @@ pub async fn vtt_stream(
// TODO should use fragments too? big films take too long...
- let tracki = *spec.track.get(0).ok_or(anyhow!("no track selected"))?;
- let local_track = local_tracks.get(0).ok_or(anyhow!("no tracks"))?.clone();
+ let tracki = *spec.track.first().ok_or(anyhow!("no track selected"))?;
+ let local_track = local_tracks.first().ok_or(anyhow!("no tracks"))?.clone();
let track = &node.public.media.unwrap().tracks[tracki];
let cp = local_track.codec_private.clone();