Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mediaplayer/src/jvmMain/native/linux/NativeVideoPlayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ static void update_stream_metadata(VideoPlayer* p);
static pthread_once_t gst_init_once = PTHREAD_ONCE_INIT;

static void gst_init_func(void) {
// GStreamer's segfault trap swaps in its own SIGSEGV handler while it loads a plugin. Inside a JVM that
// handler catches the JVM's own deliberate SIGSEGVs (stack banging, implicit null checks, safepoint polls)
// and calls exit(-1), killing the whole app. The JVM handles those signals itself, so turn the trap off.
// Must run before gst_init().
gst_segtrap_set_enabled(FALSE);
gst_init(NULL, NULL);
}

Expand Down