ralfbiedert / openh264-rs

Idiomatic Rust wrappers around OpenH264.
69 stars 35 forks source link

Fix build on x86_64 macOS #25

Closed gil0mendes closed 1 year ago

gil0mendes commented 1 year ago

As reported on issue #24, there is an issue with x86_64 macOS builds.

This happens due to the symbols generated by nasm come prefixed with an underscore, but seems like is not what is expected.

ralfbiedert commented 1 year ago

This is great, thank you so much! Just one small nit, see above, I'd prefer if all "define" logic stays in one block above the invocation to simplify mentally parsing that function.

gil0mendes commented 1 year ago

Are you saying grouping like that?

ralfbiedert commented 1 year ago

~Oh wow, I just noticed that PREFIX doesn't have an alternative value, you just set it to None. Why / how does this work, like what's the value if you don't set it and where does that come from?~

TIL, setting None doesn't remove that setting, it just sets an empty define ...

gil0mendes commented 1 year ago

@ralfbiedert Yes, it just set to None so the setting exists, but with no value. That changes the behavior of this macro.

https://github.com/ralfbiedert/openh264-rust/blob/bd45224571ed8c82331b5b6166eb89b557f10141/openh264-sys2/upstream/codec/common/x86/asm_inc.asm#L487-L504