let soniton = NASoniton::new(bits_per_sample as u8, SONITON_FLAG_SIGNED);
let ahdr = NAAudioInfo::new(samplespersec, channels as u8, soniton, block_align as usize);
- let edata = dmx.read_extradata(size - 16)?;
+ let edata;
+ if size > 16 {
+ let edata_size = dmx.src.read_u16le()? as usize;
+ validate!(edata_size + 18 == size);
+ edata = dmx.read_extradata(size - 18)?;
+ } else {
+ edata = None;
+ }
let cname = match register::find_codec_from_wav_twocc(w_format_tag) {
None => "unknown",
Some(name) => name,