Skip to content

Commit

Permalink
mkv: fixed off-by-one error in FixedSize lacing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
darksv committed Nov 18, 2021
1 parent a9e5d81 commit e9faee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion symphonia-format-mkv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn extract_frames(block: &[u8], buffer: &mut VecDeque<(u32, Box<[u8]>)>) -> Resu
buffer.push_back((track, reader.read_boxed_slice_exact(size)?));
}
Lacing::FixedSize => {
let frames = reader.read_byte()? as usize;
let frames = reader.read_byte()? as usize + 1;
let total_size = block.len() - reader.pos() as usize;
if total_size % frames != 0 {
return Err(Error::DecodeError("mkv: invalid block size"));
Expand Down

0 comments on commit e9faee5

Please sign in to comment.