Skip to content

fix: enforce 4K resolution cap when video metadata reports 0x0 - #45

Closed
btfcookies wants to merge 1 commit into
MrDragon0011:mainfrom
btfcookies:fix/video-dimension-guard
Closed

fix: enforce 4K resolution cap when video metadata reports 0x0#45
btfcookies wants to merge 1 commit into
MrDragon0011:mainfrom
btfcookies:fix/video-dimension-guard

Conversation

@btfcookies

Copy link
Copy Markdown

Some containers don't expose frame dimensions via CAP_PROP_FRAME_WIDTH/ HEIGHT, so _open_video's MAX_VIDEO_DIM check silently passed on 0x0 and the real frame size — learned from the first decoded frame — was never validated. All three video loops now re-apply the cap at that point, closing the resource-limit bypass for oversized clips.

Some containers don't expose frame dimensions via CAP_PROP_FRAME_WIDTH/
HEIGHT, so _open_video's MAX_VIDEO_DIM check silently passed on 0x0 and
the real frame size — learned from the first decoded frame — was never
validated. All three video loops now re-apply the cap at that point,
closing the resource-limit bypass for oversized clips.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@btfcookies

Copy link
Copy Markdown
Author

Why was this not merged?

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