A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 05:45 UTC
[Bugfix] Handle libsndfile sf_error(NULL) race condition in audio fallback (#37782)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Andreas Karatzas committed
Mar 22, 2026 at 00:37 UTC
5dac719b2b5f72d9fbd417c839cb0154607950c0
1 file changed
+5
-1
vllm/multimodal/media/audio.py
+5
-1
@@ -34,10 +34,14 @@ except ImportError:
34
# Public libsndfile error codes exposed via `soundfile.LibsndfileError.code`, soundfile
35
# being librosa's main backend. Used to validate if an audio loading error is due to a
36
# server error vs a client error (invalid audio file).
37
+# 0 = sf_error(NULL) race condition: when multiple threads fail sf_open_virtual
38
+# concurrently, one thread may clear the global error before another reads it,
39
+# producing code=0 ("Garbled error message from libsndfile" in soundfile).
40
+# See: https://github.com/bastibe/python-soundfile/issues/479
41
# 1 = unrecognised format (file is not a supported audio container)
42
# 3 = malformed file (corrupt or structurally invalid audio)
43
# 4 = unsupported encoding (codec not supported by this libsndfile build)
40
-_BAD_SF_CODES = {1, 3, 4}
44
+_BAD_SF_CODES = {0, 1, 3, 4}
45
46
47
def load_audio_pyav(