diff --git a/jxl/src/container/box_header.rs b/jxl/src/container/box_header.rs index 309cbbd..920ff88 100644 --- a/jxl/src/container/box_header.rs +++ b/jxl/src/container/box_header.rs @@ -27,10 +27,6 @@ impl ContainerBoxHeader { pub(super) fn parse(reader: &super::ConcatSlice<'_, '_>) -> Result { let mut buf = [0u8; 16]; let buf = reader.peek(&mut buf); - if buf.len() < 8 { - return Ok(HeaderParseResult::NeedMoreData); - } - let (tbox, box_size, header_size) = match *buf { [0, 0, 0, 1, t0, t1, t2, t3, s0, s1, s2, s3, s4, s5, s6, s7, ..] => { let xlbox = u64::from_be_bytes([s0, s1, s2, s3, s4, s5, s6, s7]);