mirror of
https://github.com/alfg/mp4-rust.git
synced 2025-01-03 00:48:40 +00:00
clippy fixes
This commit is contained in:
parent
3fa3856797
commit
94b9bff82f
1 changed files with 9 additions and 9 deletions
18
src/track.rs
18
src/track.rs
|
@ -216,7 +216,7 @@ impl Mp4Track {
|
||||||
mp4a_opt = Some(mp4a);
|
mp4a_opt = Some(mp4a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref mp4a) = mp4a_opt {
|
if let Some(mp4a) = mp4a_opt {
|
||||||
if let Some(ref esds) = mp4a.esds {
|
if let Some(ref esds) = mp4a.esds {
|
||||||
SampleFreqIndex::try_from(esds.es_desc.dec_config.dec_specific.freq_index)
|
SampleFreqIndex::try_from(esds.es_desc.dec_config.dec_specific.freq_index)
|
||||||
} else {
|
} else {
|
||||||
|
@ -236,7 +236,7 @@ impl Mp4Track {
|
||||||
mp4a_opt = Some(mp4a);
|
mp4a_opt = Some(mp4a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref mp4a) = mp4a_opt {
|
if let Some(mp4a) = mp4a_opt {
|
||||||
if let Some(ref esds) = mp4a.esds {
|
if let Some(ref esds) = mp4a.esds {
|
||||||
ChannelConfig::try_from(esds.es_desc.dec_config.dec_specific.chan_conf)
|
ChannelConfig::try_from(esds.es_desc.dec_config.dec_specific.chan_conf)
|
||||||
} else {
|
} else {
|
||||||
|
@ -270,7 +270,7 @@ impl Mp4Track {
|
||||||
mp4a_opt = Some(mp4a);
|
mp4a_opt = Some(mp4a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref mp4a) = mp4a_opt {
|
if let Some(mp4a) = mp4a_opt {
|
||||||
if let Some(ref esds) = mp4a.esds {
|
if let Some(ref esds) = mp4a.esds {
|
||||||
esds.es_desc.dec_config.avg_bitrate
|
esds.es_desc.dec_config.avg_bitrate
|
||||||
} else {
|
} else {
|
||||||
|
@ -313,7 +313,7 @@ impl Mp4Track {
|
||||||
avc1_opt = Some(avc1);
|
avc1_opt = Some(avc1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref avc1) = avc1_opt {
|
if let Some(avc1) = avc1_opt {
|
||||||
AvcProfile::try_from((
|
AvcProfile::try_from((
|
||||||
avc1.avcc.avc_profile_indication,
|
avc1.avcc.avc_profile_indication,
|
||||||
avc1.avcc.profile_compatibility,
|
avc1.avcc.profile_compatibility,
|
||||||
|
@ -332,8 +332,8 @@ impl Mp4Track {
|
||||||
avc1_opt = Some(avc1);
|
avc1_opt = Some(avc1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref avc1) = avc1_opt {
|
if let Some(avc1) = avc1_opt {
|
||||||
match avc1.avcc.sequence_parameter_sets.get(0) {
|
match avc1.avcc.sequence_parameter_sets.first() {
|
||||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||||
None => Err(Error::EntryInStblNotFound(
|
None => Err(Error::EntryInStblNotFound(
|
||||||
self.track_id(),
|
self.track_id(),
|
||||||
|
@ -355,8 +355,8 @@ impl Mp4Track {
|
||||||
avc1_opt = Some(avc1);
|
avc1_opt = Some(avc1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref avc1) = avc1_opt {
|
if let Some(avc1) = avc1_opt {
|
||||||
match avc1.avcc.picture_parameter_sets.get(0) {
|
match avc1.avcc.picture_parameter_sets.first() {
|
||||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||||
None => Err(Error::EntryInStblNotFound(
|
None => Err(Error::EntryInStblNotFound(
|
||||||
self.track_id(),
|
self.track_id(),
|
||||||
|
@ -378,7 +378,7 @@ impl Mp4Track {
|
||||||
mp4a_opt = Some(mp4a);
|
mp4a_opt = Some(mp4a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(ref mp4a) = mp4a_opt {
|
if let Some(mp4a) = mp4a_opt {
|
||||||
if let Some(ref esds) = mp4a.esds {
|
if let Some(ref esds) = mp4a.esds {
|
||||||
AudioObjectType::try_from(esds.es_desc.dec_config.dec_specific.profile)
|
AudioObjectType::try_from(esds.es_desc.dec_config.dec_specific.profile)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue