mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2026-01-01 17:30:44 +00:00
Cue lists in progress
Need to clean up zero-terminated strings in adtl
This commit is contained in:
@@ -21,11 +21,20 @@ pub fn collect_list_form(list_contents :& [u8]) -> Result<Vec<ListFormItem>, Err
|
||||
while remain > 0 {
|
||||
let this_sig = cursor.read_fourcc()?;
|
||||
let this_size = cursor.read_u32::<LittleEndian>()? as usize;
|
||||
remain -= 8;
|
||||
let mut content_buf = vec![0u8; this_size];
|
||||
|
||||
cursor.read_exact(&mut content_buf)?;
|
||||
remain -= this_size;
|
||||
|
||||
retval.push( ListFormItem { signature : this_sig, contents : content_buf } );
|
||||
|
||||
if this_size % 2 == 1 {
|
||||
cursor.read_u8()?;
|
||||
//panic!("Got this far!");
|
||||
remain -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ok( retval )
|
||||
}
|
||||
Reference in New Issue
Block a user