aboutsummaryrefslogtreecommitdiff
path: root/remuxer/src/seek_index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'remuxer/src/seek_index.rs')
-rw-r--r--remuxer/src/seek_index.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/remuxer/src/seek_index.rs b/remuxer/src/seek_index.rs
index 1e1ce02..33c1189 100644
--- a/remuxer/src/seek_index.rs
+++ b/remuxer/src/seek_index.rs
@@ -15,7 +15,7 @@ use jellymatroska::{
use log::{debug, info, trace, warn};
use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path, sync::Arc};
-#[derive(Debug, Clone, Decode, Encode)]
+#[derive(Debug, Clone, Default, Decode, Encode)]
pub struct SeekIndex {
pub blocks: Vec<BlockIndex>,
pub keyframes: Vec<usize>,
@@ -29,15 +29,6 @@ pub struct BlockIndex {
pub size: usize,
}
-impl Default for SeekIndex {
- fn default() -> Self {
- Self {
- blocks: Vec::new(),
- keyframes: Vec::new(),
- }
- }
-}
-
pub fn get_seek_index(path: &Path) -> anyhow::Result<Arc<BTreeMap<u64, Arc<SeekIndex>>>> {
cache_memory("seekindex-v1", path, move || {
info!("generating seek index for {path:?}");