diff --git a/crates/h264/src/synth_tests.rs b/crates/h264/src/synth_tests.rs index 24a104cf..a2f9988a 100644 --- a/crates/h264/src/synth_tests.rs +++ b/crates/h264/src/synth_tests.rs @@ -116,14 +116,16 @@ fn avcc_rejects_a_valid_picture_slice_without_starting_a_picture() { }, false, ); - let mut avcc = vec![1, 66, 0, 30, 0xff, 0xe2]; - for nal in [&sequence[4..], &slice[4..]] { + let mut avcc = vec![1, 66, 0, 30, 0xff, 0xe1]; + for nal in [&sequence[4..]] { avcc.extend_from_slice(&(nal.len() as u16).to_be_bytes()); avcc.extend_from_slice(nal); } - avcc.push(1); + avcc.push(2); avcc.extend_from_slice(&((picture.len() - 4) as u16).to_be_bytes()); avcc.extend_from_slice(&picture[4..]); + avcc.extend_from_slice(&((slice.len() - 4) as u16).to_be_bytes()); + avcc.extend_from_slice(&slice[4..]); let mut decoder = Decoder::with_threads(1); assert!(decoder.configure_avcc(&avcc).is_err()); diff --git a/crates/hevc/src/synth_tests.rs b/crates/hevc/src/synth_tests.rs index 7baf7b49..4d044a3d 100644 --- a/crates/hevc/src/synth_tests.rs +++ b/crates/hevc/src/synth_tests.rs @@ -700,5 +700,6 @@ fn hvcc_rejects_a_valid_picture_slice_without_starting_a_picture() { let mut decoder = Decoder::with_threads(1); assert!(decoder.configure_hvcc(&hvcc).is_err()); + assert!(decoder.flush().is_empty()); assert_eq!(decoder.stats().pictures, 0); }