Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that auxiliary tracks have 'auxv' as the handler_type #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/specs/heif/heif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@ static const SpecDesc specHeif =
trackId = (uint32_t)sym.value;
}

if(handlerType == FOURCC("pict") && trackId)
if(trackId)
{
if(handlerType != FOURCC("auxv"))
{
out->error("Found 'auxl' track (trackId: %u) with unexpected handler_type=\"%s\". Must be 'auxv'.", trackId, toString(handlerType).c_str());
}

auto id = findTrackId(moovChild);

if(id)
Expand Down
2 changes: 1 addition & 1 deletion src/specs/miaf/miaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ std::initializer_list<RuleDesc> rulesMiafGeneral =
trackId = (uint32_t)sym.value;
}

if(handlerType == FOURCC("pict") && trackId)
if(handlerType == FOURCC("auxv") && trackId)
{
auto id = findTrackId(moovChild);

Expand Down
12 changes: 11 additions & 1 deletion tests/avif/invalid-avis-pict.ref
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,32 @@ displayable (not hidden)

Specification description: HEIF - ISO/IEC 23008-12 - 2nd Edition N18310

[heif][Rule #1] Error: Found 'auxl' track (trackId: 1) with unexpected handler_type="pico". Must be 'auxv'.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[heif][Rule #1] Error: Found 'auxl' track (trackId: 1) with unexpected handler_type="pico". Must be 'auxv'.
[heif][Rule #1] Error: Found 'auxl' track (trackId: 1) with unexpected handler_type="pict". Must be 'auxv'.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or wait, maybe this was intended...

[heif][Rule #3] Error: The handler type for the MetaBox shall be 'pict'
[heif][Rule #32] Error: 'mif1' brand: this file shall conform to HEIF section 6, check the other errors for details
[heif][Rule #33] Error: 'msf1' brand: this file shall conform to HEIF section 7, check the other errors for details

========================================
[heif] 2 error(s), 0 warning(s).
[heif] 4 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:

[heif][Rule #1] Section 7.5.3.1
The nature of the auxiliary track is announced by the AuxiliaryTypeInfoBox that
shall be included in the sample entry of the auxiliary track.

[heif][Rule #3] Section 6.2
The handler type for the MetaBox shall be 'pict'.

[heif][Rule #32] Section 10.2
when a brand specified in 10.2 is among the compatible brands of a file,
the requirements specified in Clause 6 shall be obeyed

[heif][Rule #33] Section 10.3
when a brand specified in 10.3 is among the compatible brands of a file,
the requirements specified in Clause 7 shall be obeyed

+--------------------------------------+
| isobmff validation |
+--------------------------------------+
Expand Down
3 changes: 2 additions & 1 deletion tests/heif/invalid-auxl-auxi.ref
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

Specification description: HEIF - ISO/IEC 23008-12 - 2nd Edition N18310

[heif][Rule #1] Error: Found 'auxl' track (trackId: 1) with unexpected handler_type="pict". Must be 'auxv'.
[heif][Rule #1] Error: AuxiliaryTypeInfoBox ('auxi') is absent (trackIDs: video=1, aux=2)
[heif][Rule #33] Error: 'msf1' brand: this file shall conform to HEIF section 7, check the other errors for details

========================================
[heif] 2 error(s), 0 warning(s).
[heif] 3 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:
Expand Down
2 changes: 1 addition & 1 deletion tests/heif/invalid-brand-msf1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/heif/valid-auxl-auxi.asm
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/heif/valid-brand-msf1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/heif/valid-multiple-extents.asm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/miaf/invalid-alpha-track-composition-times.asm
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/miaf/invalid-pixi-displayable.asm
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('pict')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')

db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down
2 changes: 1 addition & 1 deletion tests/miaf/valid-alpha-track-composition-times.asm
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ moov_start:
db 0x00 ; "version(8)"
db 0x00, 0x00, 0x00 ; "flags(24)"
db 0x00, 0x00, 0x00, 0x00 ; "pre_defined(32)"
db 0x70, 0x69, 0x63, 0x74 ; "handler_type(32)" ('pict')
db 0x61, 0x75, 0x78, 0x76 ; "handler_type(32)" ('auxv')
db 0x00, 0x00, 0x00, 0x00 ; "reserved1(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved2(32)"
db 0x00, 0x00, 0x00, 0x00 ; "reserved3(32)"
Expand Down