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

Reconsider using .rustified_enum() for bindings generation #59

Open
FreezyLemon opened this issue May 17, 2024 · 0 comments
Open

Reconsider using .rustified_enum() for bindings generation #59

FreezyLemon opened this issue May 17, 2024 · 0 comments

Comments

@FreezyLemon
Copy link
Contributor

Due to the ability of enums in C to be treated as basically just an integer with some predefined constants, it's probably not a good idea to treat all of the FFmpeg enums as Rust enums. Rust enums are a lot stricter and there is probably a decent amount of UB in the crate because of .rustifed_enum() atm. They should almost definitely use newtypes around integers for the bindings, and then enums or bitflags structs on the Rust side.

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

No branches or pull requests

1 participant