1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2025-04-15 08:14:15 +00:00
This commit is contained in:
damitha 2025-03-21 12:13:09 +11:00
parent 1eda162732
commit 792a92222a
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@
//! use mp4::{Result};
//!
//! fn main() -> Result<()> {
//! let f = File::open("tests/samples/he-aac.mp4").unwrap();
//! let f = File::open("tests/samples/minimal.mp4").unwrap();
//! let size = f.metadata()?.len();
//! let reader = BufReader::new(f);
//!

View file

@ -85,11 +85,11 @@ impl<W: Write + Seek> Mp4Writer<W> {
})
}
pub fn add_track(&mut self, config: &TrackConfig) -> Result<()> {
pub fn add_track(&mut self, config: &TrackConfig) -> Result<u32> {
let track_id = self.tracks.len() as u32 + 1;
let track = Mp4TrackWriter::new(track_id, config)?;
self.tracks.push(track);
Ok(())
Ok(track_id)
}
fn update_durations(&mut self, track_dur: u64) {