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 >0 pixi planes have the same depth #2058

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

y-guyon
Copy link
Collaborator

@y-guyon y-guyon commented Mar 15, 2024

No description provided.

@y-guyon y-guyon merged commit 6094ac0 into AOMediaCodec:main Mar 15, 2024
21 checks passed
@y-guyon y-guyon deleted the pixi branch March 15, 2024 09:41
Copy link
Collaborator

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

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

Good change. Thanks!

@@ -2222,12 +2222,19 @@ static avifBool avifParsePixelInformationProperty(avifProperty * prop, const uin

avifPixelInformationProperty * pixi = &prop->u.pixi;
AVIF_CHECK(avifROStreamRead(&s, &pixi->planeCount, 1)); // unsigned int (8) num_channels;
if (pixi->planeCount > MAX_PIXI_PLANE_DEPTHS) {
if (pixi->planeCount < 1 || pixi->planeCount > MAX_PIXI_PLANE_DEPTHS) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Since pixi->planeCount is an unsigned type, I probably would test pixi->planeCount == 0 (as in the original code, at line 4612).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is fine with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants