Skip to content

Pass flags through HWAccel.create(), and match more type stubs to the runtime - #2416

Merged
WyattBlue merged 2 commits into
mainfrom
fix/hwaccel-flags-and-stubs
Sep 27, 2026
Merged

WyattBlue merged 2 commits into
mainfrom
fix/hwaccel-flags-and-stubs

Conversation

@WyattBlue

@WyattBlue WyattBlue commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

No description provided.

create() builds the context it returns from a new HWAccel, and copied
every argument but flags, so av_hwdevice_ctx_create() always got 0.
VideoStream.__getattr__ raises AttributeError for framerate and rate on
purpose, so the stub let code type-check that failed at runtime. Drop
them, along with Buffer.__bytes__ and InputContainer.flush_buffers(),
which do not exist from Python either.

HWAccel defaults allow_software_fallback to True, not False, and accepts
an int device type. ArgumentError is also a ValueError.

Add HWAccel.config, FilterContext.filter, Subtitle.type, and
VideoCodecContext.reformatter, which the runtime has and the stubs did
not.
@WyattBlue
WyattBlue merged commit cb65007 into main Sep 27, 2026
9 checks passed
@WyattBlue
WyattBlue deleted the fix/hwaccel-flags-and-stubs branch September 27, 2026 02:31
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.

1 participant