aboutsummaryrefslogtreecommitdiff
path: root/stream/src/segment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/segment.rs')
-rw-r--r--stream/src/segment.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/stream/src/segment.rs b/stream/src/segment.rs
index 309da1d..a2553bc 100644
--- a/stream/src/segment.rs
+++ b/stream/src/segment.rs
@@ -17,7 +17,7 @@ use tokio_util::io::SyncIoBridge;
pub async fn segment_stream(
node: Node,
- track_sources: Vec<LocalTrack>,
+ local_tracks: Vec<LocalTrack>,
spec: StreamSpec,
mut b: DuplexStream,
perms: &PermissionSet,
@@ -28,6 +28,11 @@ pub async fn segment_stream(
let track = spec.tracks[0];
let n = spec.index.ok_or(anyhow!("segment index missing"))?;
+ let local_track = local_tracks
+ .get(0)
+ .ok_or(anyhow!("track missing"))?
+ .to_owned();
+
if let Some(profile) = spec.profile {
perms.assert(&UserPermission::Transcode)?;
let location = transcode(
@@ -41,7 +46,7 @@ pub async fn segment_stream(
SyncIoBridge::new(b),
&CONF.library_path,
&node.public,
- track_sources,
+ &local_track,
track,
false,
n,
@@ -65,7 +70,7 @@ pub async fn segment_stream(
b,
&CONF.library_path,
&node.public,
- track_sources,
+ &local_track,
track,
spec.webm.unwrap_or(false),
n,