offtab: Vec<u64>,
sizetab: Vec<u32>,
framelen: u32,
+ duration: u64,
}
impl<'a> TTADemuxer<'a> {
offtab: Vec::new(),
sizetab: Vec::new(),
framelen: 0,
+ duration: 0,
}
}
}
self.framelen = srate * 256 / 245;
self.nframes = (self.nsamples + self.framelen - 1) / self.framelen;
+ self.duration = u64::from(self.nsamples) * 1000 / u64::from(srate);
seek_index.mode = SeekIndexMode::Present;
let mut off = u64::from(self.nframes) * 4 + 4 + 22;
Ok(())
}
- fn get_duration(&self) -> u64 { 0 }
+ fn get_duration(&self) -> u64 { self.duration }
}
impl<'a> NAOptionHandler for TTADemuxer<'a> {