diff options
Diffstat (limited to 'stream')
| -rw-r--r-- | stream/Cargo.toml | 4 | ||||
| -rw-r--r-- | stream/src/fragment.rs | 5 | ||||
| -rw-r--r-- | stream/src/lib.rs | 4 | ||||
| -rw-r--r-- | stream/src/stream_info.rs | 4 | ||||
| -rw-r--r-- | stream/types/Cargo.toml | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/stream/Cargo.toml b/stream/Cargo.toml index 8e71e1c..015966c 100644 --- a/stream/Cargo.toml +++ b/stream/Cargo.toml @@ -12,5 +12,5 @@ jellystream-types = { path = "types" } log = { workspace = true } anyhow = { workspace = true } -serde_json = "1.0.138" -serde = { version = "1.0.217", features = ["derive"] } +serde_json = "1.0.145" +serde = { version = "1.0.228", features = ["derive"] } diff --git a/stream/src/fragment.rs b/stream/src/fragment.rs index 0039bc5..97ca2db 100644 --- a/stream/src/fragment.rs +++ b/stream/src/fragment.rs @@ -95,13 +95,12 @@ pub fn fragment_stream( cluster.simple_blocks.retain(|b| b.track == track_num); cluster.block_groups.retain(|b| b.block.track == track_num); let next_kf = next_cluster - .map(|x| { + .and_then(|x| { x.simple_blocks .iter() .find(|b| b.track == track_num) .cloned() - }) - .flatten(); + }); let jr_container = match container { StreamContainer::WebM => ContainerFormat::Webm, diff --git a/stream/src/lib.rs b/stream/src/lib.rs index 60c283c..724a593 100644 --- a/stream/src/lib.rs +++ b/stream/src/lib.rs @@ -73,7 +73,7 @@ pub fn stream_head(spec: &StreamSpec) -> StreamHead { Original { .. } => "video/x-matroska", HlsMultiVariant { .. } => "application/vnd.apple.mpegurl", HlsVariant { .. } => "application/vnd.apple.mpegurl", - Info { .. } => "application/jellything-stream-info+json", + Info => "application/jellything-stream-info+json", FragmentIndex { .. } => "application/jellything-frag-index+json", Fragment { container, .. } => container_ct(*container), Remux { container, .. } => container_ct(*container), @@ -120,7 +120,7 @@ fn original_stream( .get(track) .ok_or(anyhow!("unknown track"))?; let mut file = File::open(&iinfo.paths[file_index]).context("opening source")?; - file.seek(SeekFrom::Start(range.start as u64)) + file.seek(SeekFrom::Start(range.start)) .context("seek source")?; Ok(Box::new(file.take(range.end - range.start))) diff --git a/stream/src/stream_info.rs b/stream/src/stream_info.rs index 7ebc399..59e9d83 100644 --- a/stream/src/stream_info.rs +++ b/stream/src/stream_info.rs @@ -28,8 +28,8 @@ pub(crate) fn stream_info(info: Arc<SMediaInfo>) -> Result<(InternalStreamInfo, let mut metadata_arr = Vec::new(); let mut paths = Vec::new(); for (i, path) in info.files.iter().enumerate() { - let metadata = read_metadata(&path)?; - let cue_stat = generate_cues(&path)?; + let metadata = read_metadata(path)?; + let cue_stat = generate_cues(path)?; if let Some(t) = &metadata.tracks { let duration = media_duration(&metadata.info); for t in &t.entries { diff --git a/stream/types/Cargo.toml b/stream/types/Cargo.toml index f441730..12bcb1d 100644 --- a/stream/types/Cargo.toml +++ b/stream/types/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2024" [dependencies] -serde = { version = "1.0.219", features = ["derive"] } +serde = { version = "1.0.228", features = ["derive"] } |