Skip to content

bitmap_packer: return -1 instead of aborting on invalid bitmap size#18143

Merged
Dudemanguy merged 2 commits into
mpv-player:masterfrom
Dudemanguy:bitpacker-pack
Jun 17, 2026
Merged

bitmap_packer: return -1 instead of aborting on invalid bitmap size#18143
Dudemanguy merged 2 commits into
mpv-player:masterfrom
Dudemanguy:bitpacker-pack

Conversation

@Dudemanguy

Copy link
Copy Markdown
Member

All current callers of this already handle the -1 case like an error, so instead of killing everything just return -1.

All current callers of this already handle the -1 case like an error, so
instead of killing everything just return -1.
Comment thread video/out/bitmap_packer.c Outdated
Ideally we would properly log this with mp_log but the plumbing for that
was deemed too ugly and not really worth it for just this one mysterious
edge case. So instead, drop the fprintf business since we really
shouldn't be doing that.

@kasper93 kasper93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@Dudemanguy Dudemanguy merged commit 306546f into mpv-player:master Jun 17, 2026
34 checks passed
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