Skip to content

Conversation

gxalpha
Copy link

@gxalpha gxalpha commented Oct 1, 2025

When receiving IOSurfaces from Syphon, calling IOSurfaceGetPixelFormat on them returns 0. This is not ideal. In fact, per the Apple documentation, 0 is returned when the IOSurfaces are invalid.

This was discovered in OBS Studio when an unknown bug that treated 0 as ...32BGRA instead of invalid was accidentally fixed in a code refactor. The IOSurfaces from Syphon however were all 32BGRA, so treating them as such happened to work, until this fix that actually treats them as invalid, leading to Syphon sources no longer working. This will be un-fixed in OBS to restore previous behavior, but it would still be nice to have the IOSurfaces return their proper pixel format (so that maybe in the future, this un-fix won't be necessary anymore).

I tested this by building the simple server against this patched version of the framework and receiving it in OBS Studio 31.0.1 (which rejects 0) and confirmed that it receives the images correctly (note that 31.0.2 will likely have the patch that will make 0 "work" again, so using specifically 32.0.1 (or an earlier 32.0 release or beta) to test is important).

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