Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement ov_read_filter callback wrapper for libvorbisfile#3604

Open
gigachadmma69 wants to merge 2 commits intoptitSeb:mainfrom
gigachadmma69:fix/ov-read-filter
Open

Implement ov_read_filter callback wrapper for libvorbisfile#3604
gigachadmma69 wants to merge 2 commits intoptitSeb:mainfrom
gigachadmma69:fix/ov-read-filter

Conversation

@gigachadmma69
Copy link
Contributor

@gigachadmma69 gigachadmma69 commented Mar 1, 2026

Summary

Implement the missing ov_read_filter() callback wrapper in the libvorbisfile wrapper, fixing a SIGSEGV when applications use this function.

Fixes #2852

Details

ov_read_filter() was commented out in the private header because its signature contains a function pointer (B marker). This PR adds proper callback bridging following the existing pattern used by ov_open_callbacks and ov_test_callbacks.

API signature:

long ov_read_filter(OggVorbis_File *vf, char *buffer, int length,
                    int bigendianp, int word, int sgned, int *bitstream,
                    void (*filter)(float **pcm, long channels, long samples, void *filter_param),
                    void *filter_param);

Changes:

  1. Added ov_read_filter to the SUPER() function lookup (with iFppiiiippp_t typedef)
  2. Added filter callback slots (8 slots) with RunFunctionFmt("pllp", ...) bridging
  3. Added findfilterFct() for x86→native callback mapping
  4. Added my_ov_read_filter() EXPORT wrapper
  5. Changed _private.h from //GO(ov_read_filter,...) to GOM(ov_read_filter,iFEppiiiippp)

Test plan

  • Build box64 and verify no compilation errors
  • Launch Xonotic 0.8.6 and load a map (previously crashed with SIGSEGV)
  • Run any application that uses ov_read_filter for audio decoding with custom PCM filtering

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 1, 2026

STOP PUSHING BOGGUS PR; You have numerous PR that fails CI, stopping pushing new ones and fix the old one.
I'll close without message any new PR until the previous one are fixed.

@gigachadmma69
Copy link
Contributor Author

Apologies for the broken PRs — all of them should be passing CI now. I wasn't including the generated files. Won't push new PRs until everything is clean.

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 2, 2026

You need to force sync with upstream on your side, it's not merging automaticaly anymore.

Joe and others added 2 commits March 2, 2026 12:17
Add callback bridging for ov_read_filter(), which takes a filter
function pointer: void (*filter)(float **pcm, long channels,
long samples, void *filter_param).

The filter callback is wrapped using the standard SUPER() slot
pattern (8 slots) with RunFunctionFmt "pllp" format. The GOM
wrapper unpacks the x86_64 arguments and passes the wrapped
filter callback to the native ov_read_filter.

Fixes ptitSeb#2852 (Xonotic 0.8.6 SIGSEGV during map loading)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add the missing generated type definition, wrapper function,
and debug printer entry for the ov_read_filter GOM signature.
@gigachadmma69
Copy link
Contributor Author

Rebased on latest main. Wrapper.c/wrapper.h now from upstream (already had the iFEppiiiippp type). Only adds x64printer.c debug entry and wrappedvorbisfiletypes.h SUPER() entries on top.

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 2, 2026

Nope, still red...

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.

libvorbisfile.so: ov_read_filter() not implemented (SIGSEGV in Xonotic 0.8.6)

2 participants