diff --git a/src/demux/flv.rs b/src/demux/flv.rs index 80239e6..b023383 100644 --- a/src/demux/flv.rs +++ b/src/demux/flv.rs @@ -40,7 +40,7 @@ impl FLVReader { fn skip_init_header(&mut self) -> Result<(), Box> { let mut rest_of_header = [0u8; 5]; self.stdin.read_exact(&mut rest_of_header)?; - let head_offset = u32::from_be_bytes(rest_of_header[1..].try_into()?) as usize + 4; + let head_offset = u32::from_be_bytes(rest_of_header[1..].try_into()?) as usize - 9 + 4; let mut skip_header_extra = vec![0u8; head_offset]; self.stdin.read_exact(skip_header_extra.as_mut_slice())?; return Ok(());