Skip to content

Commit b4cc8c4

Browse files
authored
Merge pull request #298 from mozilla/strict-switch
Add variable strictness for spec compliance and improve checks
2 parents 1ab3020 + cb0526e commit b4cc8c4

22 files changed

+460
-86
lines changed

mp4parse/benches/avif_benchmark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ fn avif_largest() {
1919
"av1-avif/testFiles/Netflix/avif/cosmos_frame05000_yuv444_12bpc_bt2020_pq_qlossless.avif",
2020
)
2121
.expect("Unknown file");
22-
assert!(mp4::read_avif(input).is_ok());
22+
assert!(mp4::read_avif(input, mp4::ParseStrictness::Normal).is_ok());
2323
}

mp4parse/src/boxes.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,16 @@ box_database!(
116116
MediaHeaderBox 0x6d64_6864, // "mdhd"
117117
HandlerBox 0x6864_6c72, // "hdlr"
118118
MediaInformationBox 0x6d69_6e66, // "minf"
119-
ImageReferenceBox 0x6972_6566, // "iref"
120-
ImagePropertiesBox 0x6970_7270, // "iprp"
119+
ItemReferenceBox 0x6972_6566, // "iref"
120+
ItemPropertiesBox 0x6970_7270, // "iprp"
121121
ItemPropertyContainerBox 0x6970_636f, // "ipco"
122122
ItemPropertyAssociationBox 0x6970_6d61, // "ipma"
123123
ColorInformationBox 0x636f_6c72, // "colr"
124124
PixelInformationBox 0x7069_7869, // "pixi"
125125
AuxiliaryTypeProperty 0x6175_7843, // "auxC"
126+
CleanApertureBox 0x636c_6170, // "clap"
127+
ImageRotation 0x6972_6f74, // "irot"
128+
ImageMirror 0x696d_6972, // "imir"
126129
SampleTableBox 0x7374_626c, // "stbl"
127130
SampleDescriptionBox 0x7374_7364, // "stsd"
128131
TimeToSampleBox 0x7374_7473, // "stts"

mp4parse/src/lib.rs

Lines changed: 273 additions & 37 deletions
Large diffs are not rendered by default.

mp4parse/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ fn read_vpcc_version_0() {
426426

427427
// TODO: it'd be better to find a real sample here.
428428
#[test]
429-
#[allow(clippy::inconsistent_digit_grouping)] // Allow odd grouping for test readability.
429+
#[allow(clippy::unusual_byte_groupings)] // Allow odd grouping for test readability.
430430
fn read_vpcc_version_1() {
431431
let data_length = 12u16;
432432
let mut stream = make_fullbox(BoxSize::Auto, b"vpcC", 1, |s| {
334 Bytes
Binary file not shown.
Binary file not shown.
334 Bytes
Binary file not shown.
334 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)