Skip to content

Commit f1ad3d4

Browse files
author
seydx
committed
update patches
1 parent 5f0d11b commit f1ad3d4

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Index: FFmpeg/libavfilter/af_whisper.c
2+
===================================================================
3+
--- FFmpeg.orig/libavfilter/af_whisper.c
4+
+++ FFmpeg/libavfilter/af_whisper.c
5+
@@ -92,8 +92,16 @@ static int init(AVFilterContext *ctx)
6+
{
7+
WhisperContext *wctx = ctx->priv;
8+
9+
- static AVOnce init_static_once = AV_ONCE_INIT;
10+
- ff_thread_once(&init_static_once, ggml_backend_load_all);
11+
+ // When GPU is disabled, skip ggml_backend_load_all() to prevent crashes
12+
+ // on systems without GPU hardware (e.g. CPU-only containers where
13+
+ // Vulkan/OpenCL initialization may segfault or throw uncaught exceptions
14+
+ // during device enumeration). The CPU backend is always available via
15+
+ // static linking (GGML_USE_CPU) or dynamic loading (GGML_BACKEND_DL).
16+
+ // When GPU is enabled, load all backends so GPU devices are discoverable.
17+
+ if (wctx->use_gpu) {
18+
+ static AVOnce gpu_backends_loaded = AV_ONCE_INIT;
19+
+ ff_thread_once(&gpu_backends_loaded, ggml_backend_load_all);
20+
+ }
21+
22+
whisper_log_set(cb_log, ctx);
23+

patches/jellyfin/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@
8484
1009-hevc-parameter-sets.patch
8585
1011-check-vaapi-drm-availability.patch
8686
1012-avfoundation-device-capture.patch
87+
1013-fix-whisper-skip-gpu-backends-when-disabled.patch

0 commit comments

Comments
 (0)