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

Add diagnostic messages if imageSizeLimit exceeded #732

Merged

Conversation

wantehchang
Copy link
Collaborator

Add custom diagnostic messages if item size, track size, or grid
dimensions exceed imageSizeLimit.

Related to #263.

Add custom diagnostic messages if item size, track size, or grid
dimensions exceed imageSizeLimit.

Related to AOMediaCodec#263.
if (track->width > (imageSizeLimit / track->height)) {
avifDiagnosticsPrintf(diag, "Track ID [%u] size is too large [%ux%u]", track->id, track->width, track->height);
return AVIF_FALSE;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Joe: I was planning to add the AVIF_RESULT_IMAGE_TOO_LARGE error code as we previously discussed. But I found that it would take a lot of plumbing (changing three or four functions) to surface the new error code from here. (The grid and item sizes are easy to handle.) In the end I decided to just reply on diagnostic messages and not add a new error code.

Copy link
Collaborator

@joedrago joedrago left a comment

Choose a reason for hiding this comment

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

I like the new messages, LGTM.

@wantehchang wantehchang merged commit bd1492e into AOMediaCodec:master Aug 6, 2021
@wantehchang wantehchang deleted the avif-result-image-too-large branch August 6, 2021 23:46
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.

2 participants