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);
|
||||
}
|
||||
}
|
||||
if let Some(ref mp4a) = mp4a_opt {
|
||||
if let Some(mp4a) = mp4a_opt {
|
||||
if let Some(ref esds) = mp4a.esds {
|
||||
SampleFreqIndex::try_from(esds.es_desc.dec_config.dec_specific.freq_index)
|
||||
} else {
|
||||
|
@ -236,7 +236,7 @@ impl Mp4Track {
|
|||
mp4a_opt = Some(mp4a);
|
||||
}
|
||||
}
|
||||
if let Some(ref mp4a) = mp4a_opt {
|
||||
if let Some(mp4a) = mp4a_opt {
|
||||
if let Some(ref esds) = mp4a.esds {
|
||||
ChannelConfig::try_from(esds.es_desc.dec_config.dec_specific.chan_conf)
|
||||
} else {
|
||||
|
@ -270,7 +270,7 @@ impl Mp4Track {
|
|||
mp4a_opt = Some(mp4a);
|
||||
}
|
||||
}
|
||||
if let Some(ref mp4a) = mp4a_opt {
|
||||
if let Some(mp4a) = mp4a_opt {
|
||||
if let Some(ref esds) = mp4a.esds {
|
||||
esds.es_desc.dec_config.avg_bitrate
|
||||
} else {
|
||||
|
@ -313,7 +313,7 @@ impl Mp4Track {
|
|||
avc1_opt = Some(avc1);
|
||||
}
|
||||
}
|
||||
if let Some(ref avc1) = avc1_opt {
|
||||
if let Some(avc1) = avc1_opt {
|
||||
AvcProfile::try_from((
|
||||
avc1.avcc.avc_profile_indication,
|
||||
avc1.avcc.profile_compatibility,
|
||||
|
@ -332,8 +332,8 @@ impl Mp4Track {
|
|||
avc1_opt = Some(avc1);
|
||||
}
|
||||
}
|
||||
if let Some(ref avc1) = avc1_opt {
|
||||
match avc1.avcc.sequence_parameter_sets.get(0) {
|
||||
if let Some(avc1) = avc1_opt {
|
||||
match avc1.avcc.sequence_parameter_sets.first() {
|
||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||
None => Err(Error::EntryInStblNotFound(
|
||||
self.track_id(),
|
||||
|
@ -355,8 +355,8 @@ impl Mp4Track {
|
|||
avc1_opt = Some(avc1);
|
||||
}
|
||||
}
|
||||
if let Some(ref avc1) = avc1_opt {
|
||||
match avc1.avcc.picture_parameter_sets.get(0) {
|
||||
if let Some(avc1) = avc1_opt {
|
||||
match avc1.avcc.picture_parameter_sets.first() {
|
||||
Some(nal) => Ok(nal.bytes.as_ref()),
|
||||
None => Err(Error::EntryInStblNotFound(
|
||||
self.track_id(),
|
||||
|
@ -378,7 +378,7 @@ impl Mp4Track {
|
|||
mp4a_opt = Some(mp4a);
|
||||
}
|
||||
}
|
||||
if let Some(ref mp4a) = mp4a_opt {
|
||||
if let Some(mp4a) = mp4a_opt {
|
||||
if let Some(ref esds) = mp4a.esds {
|
||||
AudioObjectType::try_from(esds.es_desc.dec_config.dec_specific.profile)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue