[MPlayer-dev-eng] [PATCH] openal output

Corey Hickey bugfood-ml at fatooh.org
Wed Feb 15 18:58:41 CET 2006


Reimar Doeffinger wrote:
>>* it hangs on uninit
> 
> Can you give a gdb backtrace of the hang (start in gdb, hit CTRL-C when
> it hangs and you'll be back in gdb where you can get a backtrace).

I was trying that before, but I haven't really been able to get a
backtrace I can understand. It shows:

------------------------------------------------------------------------
Program received signal SIGINT, Interrupt.
[Switching to Thread 46912596795520 (LWP 9984)]
0x00002aaaabb3a14b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002aaaabb3a14b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#1  0x0000000000000001 in ?? ()
#2  0x0000000000000000 in ?? ()
------------------------------------------------------------------------

I guess that's the wrong thread...

------------------------------------------------------------------------
(gdb) info threads
  2 Thread 1082141024 (LWP 9987)  0x00002aaaae7811e9 in ioctl ()
   from /lib/libc.so.6
* 1 Thread 46912596795520 (LWP 9984)  0x00002aaaabb3a14b in
__lll_mutex_lock_wait () from /lib/libpthread.so.0
(gdb) thread 2
[Switching to thread 2 (Thread 1082141024 (LWP 9987))]#0
0x00002aaaae7811e9 in ioctl () from /lib/libc.so.6
(gdb) bt
#0  0x00002aaaae7811e9 in ioctl () from /lib/libc.so.6
#1  0x00002aaaab8ae5c4 in _snd_pcm_hw_open () from /usr/lib/libasound.so.2
#2  0x00002aaaae1b8993 in alsa_blitbuffer () from /usr/lib/libopenal.so.0
#3  0x00002aaaae1bbf6f in _alcDeviceWrite () from /usr/lib/libopenal.so.0
#4  0x00002aaaae191bc7 in async_mixer_iterate () from
/usr/lib/libopenal.so.0
#5  0x00002aaaae1ba5db in _alFloatMul () from /usr/lib/libopenal.so.0
#6  0x00002aaaabb35b1c in start_thread () from /lib/libpthread.so.0
#7  0x00002aaaae789052 in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()
(gdb)
------------------------------------------------------------------------

But I don't know why the backtrace doesn't go back all the way. Maybe it
will be useful to you...

> I would assume thet it hangs in that while loop - as I understood it
> OpenAL should set the source state to STOPPED on an underrund -i.e. when
> it reached the end of the stream. Can you find out the version of your
> openal lib (date, since the version number seems to have stayed the same
> for all of their versions *g*)

Sure. It's the standard libopenal0 package in Debian unstable. The
package version is 0.2005080600-2.1+b1, so the upstream date is
2005-08-06. The only other program I have that uses the debian openal is
scorched 3D, which works fine.

I just tried removing the Debian package, installing openal from the
upstream source (2006-02-11), and recompiling mplayer; the problem goes
away. So, maybe it's a problem with Debian using a version that is too
old...


Anyway, I also noticed a slight problem: when compiling ao_openal.c with
-O0, gcc complains about NULL being undefined. I guess -O2 optimizes it
away. Anyway, "#include <stdlib.h>" fixes it for me, but as far as I
know there are some other libraries that define NULL as well.

-Corey




More information about the MPlayer-dev-eng mailing list