mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-09-28 22:31:55 +00:00
Add uuid box reading to read_fragment_header
This commit is contained in:
parent
0ccaa073b1
commit
1a90e8d6fb
1 changed files with 7 additions and 2 deletions
|
@ -145,6 +145,7 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
||||||
|
|
||||||
let mut moofs = Vec::new();
|
let mut moofs = Vec::new();
|
||||||
let mut moof_offsets = Vec::new();
|
let mut moof_offsets = Vec::new();
|
||||||
|
let mut uuids = Vec::new();
|
||||||
|
|
||||||
let mut current = start;
|
let mut current = start;
|
||||||
while current < size {
|
while current < size {
|
||||||
|
@ -173,6 +174,10 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
||||||
moofs.push(moof);
|
moofs.push(moof);
|
||||||
moof_offsets.push(moof_offset);
|
moof_offsets.push(moof_offset);
|
||||||
}
|
}
|
||||||
|
BoxType::UuidBox => {
|
||||||
|
let uuid = UuidBox::read_box(&mut reader, s)?;
|
||||||
|
uuids.push(uuid);
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// XXX warn!()
|
// XXX warn!()
|
||||||
skip_box(&mut reader, s)?;
|
skip_box(&mut reader, s)?;
|
||||||
|
@ -216,8 +221,8 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
||||||
ftyp: self.ftyp.clone(),
|
ftyp: self.ftyp.clone(),
|
||||||
moov: self.moov.clone(),
|
moov: self.moov.clone(),
|
||||||
moofs,
|
moofs,
|
||||||
emsgs: self.emsgs.clone(),
|
emsgs: Vec::new(),
|
||||||
uuids: self.uuids.clone(),
|
uuids,
|
||||||
tracks,
|
tracks,
|
||||||
size,
|
size,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue