mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-04-15 08:14:15 +00:00
.
This commit is contained in:
parent
1eda162732
commit
792a92222a
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
//!
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue