aboutsummaryrefslogtreecommitdiff
path: root/stream/src/webvtt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/webvtt.rs')
-rw-r--r--stream/src/webvtt.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/stream/src/webvtt.rs b/stream/src/webvtt.rs
index faf0cd3..b1eed2f 100644
--- a/stream/src/webvtt.rs
+++ b/stream/src/webvtt.rs
@@ -12,7 +12,7 @@ use tokio::io::{AsyncWriteExt, DuplexStream};
pub async fn webvtt_stream(
node: Node,
- track_sources: Vec<LocalTrack>,
+ local_tracks: Vec<LocalTrack>,
spec: StreamSpec,
mut b: DuplexStream,
) -> Result<()> {
@@ -21,10 +21,7 @@ pub async fn webvtt_stream(
// TODO should use snippets too? big films take too long...
let tracki = *spec.tracks.get(0).ok_or(anyhow!("no track selected"))?;
- let local_track = track_sources
- .get(tracki)
- .ok_or(anyhow!("track does not exist"))?
- .clone();
+ let local_track = local_tracks.get(0).ok_or(anyhow!("no tracks"))?.clone();
let track = &node.public.media.unwrap().tracks[tracki];
match track.codec.as_str() {