mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-31 05:56:55 -06:00
test(codec): strengthen configuration slice regressions
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user