1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-19 16:58:04 +00:00

Update example in README.md.

This commit is contained in:
Alfred Gutierrez 2020-07-31 10:18:06 -07:00 committed by GitHub
parent 0df82aec5f
commit ba69f3812b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,13 +14,14 @@ use mp4;
fn main() {
let f = File::open("example.mp4").unwrap();
let size = f.metadata()?.len();
let reader = BufReader::new(f);
let bmff = mp4::read_mp4(f).unwrap();
let mut mp4 = Mp4Reader::new(reader);
mp4.read(size)?;
println!("file size: {}", bmff.size);
println!("brands: {:?} {:?}\n",
bmff.ftyp.major_brand, bmff.ftyp.compatible_brands
);
println!("size: {}", mp4.size());
println!("brands: {:?} {:?}\n", mp4.ftyp.major_brand, mp4.ftyp.compatible_brands);
}
```