Skip to content

Don't fail when the wave atom contains different atoms than esds #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions mp4parse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5736,11 +5736,15 @@ fn read_audio_sample_entry<T: Read>(src: &mut BMFFBox<T>) -> Result<SampleEntry>
codec_type = CodecType::ALAC;
codec_specific = Some(AudioCodecSpecific::ALACSpecificBox(alac));
}
BoxType::QTWaveAtom => {
let qt_esds = read_qt_wave_atom(&mut b)?;
codec_type = qt_esds.audio_codec;
codec_specific = Some(AudioCodecSpecific::ES_Descriptor(qt_esds));
}
BoxType::QTWaveAtom => match read_qt_wave_atom(&mut b) {
Ok(qt_esds) => {
codec_type = qt_esds.audio_codec;
codec_specific = Some(AudioCodecSpecific::ES_Descriptor(qt_esds));
}
Err(e) => {
warn!("Failed to parse wave atom: {e:?}");
}
},
BoxType::ProtectionSchemeInfoBox => {
if name != BoxType::ProtectedAudioSampleEntry {
return Status::StsdBadAudioSampleEntry.into();
Expand Down
Loading