You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Torchaudio ffmpeg cpp extension crashes when used with encoders that do not have threading capabilities e.g. mulaw. Easily reproducable by running the following script:
File "repro.py", line 18, in <module>
s.add_basic_audio_stream(
File ".venv/lib/python3.10/site-packages/torio/io/_streaming_media_decoder.py", line 681, in add_basic_audio_stream
self.add_audio_stream(
File ".venv/lib/python3.10/site-packages/torio/io/_streaming_media_decoder.py", line 778, in add_audio_stream
self._be.add_audio_stream(
RuntimeError: Unexpected options: threads
The reason for that is the code sets the threads entry unconditionally in
while codecs without support for threading do not delete the entry afterwards. To fix the 'threads' keyword need to be deleted manually.
Versions
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: macOS 15.2 (arm64)
GCC version: Could not collect
Clang version: 16.0.0 (clang-1600.0.26.6)
CMake version: version 3.31.6
Libc version: N/A
Python version: 3.10.16 (main, Feb 12 2025, 15:03:04) [Clang 19.1.6 ] (64-bit runtime)
Python platform: macOS-15.2-arm64-arm-64bit
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Apple M4 Max
Versions of relevant libraries:
[pip3] numpy==1.26.4
[conda] Could not collect
The text was updated successfully, but these errors were encountered:
🐛 Describe the bug
Torchaudio ffmpeg cpp extension crashes when used with encoders that do not have threading capabilities e.g. mulaw. Easily reproducable by running the following script:
Fails with:
The reason for that is the code sets the threads entry unconditionally in
audio/src/libtorio/ffmpeg/stream_reader/stream_processor.cpp
Line 139 in 318bace
while codecs without support for threading do not delete the entry afterwards. To fix the 'threads' keyword need to be deleted manually.
Versions
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: macOS 15.2 (arm64)
GCC version: Could not collect
Clang version: 16.0.0 (clang-1600.0.26.6)
CMake version: version 3.31.6
Libc version: N/A
Python version: 3.10.16 (main, Feb 12 2025, 15:03:04) [Clang 19.1.6 ] (64-bit runtime)
Python platform: macOS-15.2-arm64-arm-64bit
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Apple M4 Max
Versions of relevant libraries:
[pip3] numpy==1.26.4
[conda] Could not collect
The text was updated successfully, but these errors were encountered: