Skip to content

Fix vcam_enum_framesizes to enumerate all sizes when scaling is enabled#44

Open
davidzwei wants to merge 1 commit into
sysprog21:masterfrom
davidzwei:davidzwei/fix-enum-framesizes
Open

Fix vcam_enum_framesizes to enumerate all sizes when scaling is enabled#44
davidzwei wants to merge 1 commit into
sysprog21:masterfrom
davidzwei:davidzwei/fix-enum-framesizes

Conversation

@davidzwei
Copy link
Copy Markdown
Contributor

@davidzwei davidzwei commented May 24, 2026

When scaling is enabled, vcam_enum_framesizes only returned one frame size because the index guard was never updated after the branch was changed. The original else block also became unreachable dead code.

Fix by removing the dead code and enumerating vcam_sizes[] by index.


Summary by cubic

Fixes vcam_enum_framesizes to return all discrete frame sizes when scaling is enabled, instead of only one. Cleans up dead code and adds a proper bounds check.

  • Bug Fixes
    • Enumerates vcam_sizes by index to set each discrete size.
    • Replaces fsize->index > 0 with >= ARRAY_SIZE(vcam_sizes) and removes the unreachable stepwise branch.

Written for commit c069436. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

Copy link
Copy Markdown
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Read https://cbea.ms/git-commit/ carefully and enforce the rules.

@jserv
Copy link
Copy Markdown
Collaborator

jserv commented May 29, 2026

Provide test cases to reproduce.

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