Opened 13 years ago
Last modified 6 years ago
#314 open enhancement
OpenAL device does not work on OS X
Reported by: | Hanspeter Niederstrasser | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avdevice |
Version: | git-master | Keywords: | openal osx |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
configure is not set to find openal on OS X.
The fix for the linker check is easy: add "-Wl,-framework,OpenAL" to the list of flags to check
-enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do +enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32" "-Wl,-framework,OpenAL"; do
I don't know how to fix the header check to look for multiple possibilities, but on OS X the header in the OpenAL framework is found in OpenAL/al.h (not AL/al.h like in linux). If I change the header check in configure and the includes in libavdevice/openal-dec.c, the build and linkage works well.
However, running 'ffmpeg -f openal' as suggested in the manual fails with an malloc error, so this might just not be doable on OS X.
nieder $ /usr/local/ffmpeg-git/bin/ffmpeg -list_devices true -f openal -i dummy out.ogg ffmpeg version N-31036-g65eae2a, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 27 2011 10:29:19 with gcc 4.0.1 (Apple Inc. build 5493) configuration: --prefix=/usr/local/ffmpeg-git --mandir=/usr/local/ffmpeg-git/share/man --disable-static --enable-shared --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --enable-x11grab --enable-bzlib --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdirac --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openal --enable-zlib --disable-debug --extra-cflags='-I/sw/lib/libspeex1/include -I/sw/include -I/usr/X11R6/include' --extra-ldflags='-L/sw/lib/libspeex1/lib -L/sw/lib -L/usr/X11R6/lib' libavutil 51. 10. 0 / 51. 10. 0 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 24. 0 / 2. 24. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 [openal @ 0x200a800] List of OpenAL capture devices on this system: [openal @ 0x200a800] Built-in Microphone dummy: Immediate exit requested nieder $ /usr/local/ffmpeg-git/bin/ffmpeg -f openal -i 'Built-in Microphone' out.ogg ffmpeg version N-31036-g65eae2a, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 27 2011 10:29:19 with gcc 4.0.1 (Apple Inc. build 5493) configuration: --prefix=/usr/local/ffmpeg-git --mandir=/usr/local/ffmpeg-git/share/man --disable-static --enable-shared --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --enable-x11grab --enable-bzlib --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdirac --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openal --enable-zlib --disable-debug --extra-cflags='-I/sw/lib/libspeex1/include -I/sw/include -I/usr/X11R6/include' --extra-ldflags='-L/sw/lib/libspeex1/lib -L/sw/lib -L/usr/X11R6/lib' libavutil 51. 10. 0 / 51. 10. 0 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 24. 0 / 2. 24. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 mpeg(49840,0xa025b720) malloc: *** error for object 0x1e2c0e0: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug mpeg(49840,0xa025b720) malloc: *** error for object 0x1e2c0e0: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug [openal @ 0x200a800] Error: ALC Invalid Device Bus error
Change History (4)
comment:1 by , 13 years ago
Keywords: | openal osx added |
---|
comment:2 by , 11 years ago
Priority: | normal → wish |
---|---|
Reproduced by developer: | set |
Status: | new → open |
comment:4 by , 6 years ago
I no longer get the crash with git HEAD:
nieder $ /usr/local/ffmpeg-clang/bin/ffmpeg -f openal -i 'Built-in Microphone' out.ogg ffmpeg version N-92738-g3a36b0c4b8 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.42.1) configuration: --prefix=/usr/local/ffmpeg-clang --enable-autodetect --enable-gpl --enable-version3 --disable-static --enable-shared --enable-pthreads --disable-indev=jack --enable-bzlib --enable-chromaprint --enable-frei0r --enable-gcrypt --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcelt --enable-libcdio --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libkvazaar --enable-liblensfun --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librtmp --enable-librubberband --disable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-opencl --enable-opengl --enable-sdl2 --enable-videotoolbox --enable-zlib --cc=clang --extra-ldflags='-Wl,-dead_strip_dylibs -L/sw/lib' --extra-cflags=-I/sw/include --enable-openal libavutil 56. 24.101 / 56. 24.101 libavcodec 58. 42.104 / 58. 42.104 libavformat 58. 24.101 / 58. 24.101 libavdevice 58. 6.101 / 58. 6.101 libavfilter 7. 46.101 / 7. 46.101 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 2018-12-19 03:25:56.476 ffmpeg[49601:18236883] 03:25:56.476 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h. Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, openal, from 'Built-in Microphone': Duration: N/A, start: 1545211556.601565, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le (native) -> vorbis (libvorbis)) Press [q] to stop, [?] for help Output #0, ogg, to 'out.ogg': Metadata: encoder : Lavf58.24.101 Stream #0:0: Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp Metadata: encoder : Lavc58.42.104 libvorbis [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time Last message repeated 10 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.887x Last message repeated 13 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.953x Last message repeated 12 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.955x Last message repeated 10 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.96x Last message repeated 13 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.973x Last message repeated 11 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.977x Last message repeated 11 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.981x Last message repeated 14 times [libvorbis @ 0x7fa1bd81d400] Queue input is backward in time=0.983x Last message repeated 5 times [ogg @ 0x7fa1bd81c200] Non-monotonous DTS in output stream 0:0; previous: 184694, current: 184328; changing to 184694. This may result in incorrect timestamps in the output file. [ogg @ 0x7fa1bd81c200] Non-monotonous DTS in output stream 0:0; previous: 184694, current: 184456; changing to 184694. This may result in incorrect timestamps in the output file. ...
and the output file is successfully recorded.
However, I still had to modify header names and linker flags which are non-macOS centric.
I can reproduce the crash if I force OpenAL enabled and fix the includes and linker flags.