mirror of
https://github.com/alfg/mp4-rust.git
synced 2024-06-02 21:49:24 +00:00
Compare commits
No commits in common. "af3b69e6a4ee4ef081fdf14ce267f5f96864db50" and "0ccaa073b1da6617cd83308e9bd1fa506f36d925" have entirely different histories.
af3b69e6a4
...
0ccaa073b1
|
@ -145,7 +145,6 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
|||
|
||||
let mut moofs = Vec::new();
|
||||
let mut moof_offsets = Vec::new();
|
||||
let mut uuids = Vec::new();
|
||||
|
||||
let mut current = start;
|
||||
while current < size {
|
||||
|
@ -174,10 +173,6 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
|||
moofs.push(moof);
|
||||
moof_offsets.push(moof_offset);
|
||||
}
|
||||
BoxType::UuidBox => {
|
||||
let uuid = UuidBox::read_box(&mut reader, s)?;
|
||||
uuids.push(uuid);
|
||||
}
|
||||
_ => {
|
||||
// XXX warn!()
|
||||
skip_box(&mut reader, s)?;
|
||||
|
@ -221,8 +216,8 @@ impl<R: Read + Seek> Mp4Reader<R> {
|
|||
ftyp: self.ftyp.clone(),
|
||||
moov: self.moov.clone(),
|
||||
moofs,
|
||||
emsgs: Vec::new(),
|
||||
uuids,
|
||||
emsgs: self.emsgs.clone(),
|
||||
uuids: self.uuids.clone(),
|
||||
tracks,
|
||||
size,
|
||||
})
|
||||
|
|
|
@ -261,7 +261,7 @@ impl Mp4Track {
|
|||
|
||||
pub fn sequence_parameter_set(&self) -> Result<&[u8]> {
|
||||
if let Some(ref avc1) = self.trak.mdia.minf.stbl.stsd.avc1 {
|
||||
match avc1.avcc.sequence_parameter_sets.first() {
|
||||
match avc1.avcc.sequence_parameter_sets.get(0) {
|
||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||
None => Err(Error::EntryInStblNotFound(
|
||||
self.track_id(),
|
||||
|
@ -276,7 +276,7 @@ impl Mp4Track {
|
|||
|
||||
pub fn picture_parameter_set(&self) -> Result<&[u8]> {
|
||||
if let Some(ref avc1) = self.trak.mdia.minf.stbl.stsd.avc1 {
|
||||
match avc1.avcc.picture_parameter_sets.first() {
|
||||
match avc1.avcc.picture_parameter_sets.get(0) {
|
||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||
None => Err(Error::EntryInStblNotFound(
|
||||
self.track_id(),
|
||||
|
|
Loading…
Reference in a new issue