Xvideo problem & some questions about threads

Shane Harper shanegh at optusnet.com.au
Sat May 26 14:15:53 CEST 2001

On Thu, May 03, 2001, Samuel Hocevar wrote:
> It 
(xvideo output)
> still doesn't work properly here. From time to time, it
> doesn't run and gives an unexpected async reply. I suspect there is a
> race condition somewhere, but I couldn't find the reason, and when run
> within gdb it doesn't segfault anymore.

Could the problem be that the interface thread and the video output thread
may try to call (non-reentrant) Xlib functions at approximately the same

(Perhaps we need to use the XInitThreads, XLockDisplay and XUnlockDisplay

Recent versions of vlc seg-fault on my system during initialisation of the
DVD input module. However, I don't get a seg-fault if I use "mpatrol"
(mpatrol contains its own versions of malloc, etc which are supposed to
detect problems with dynamic memory usage).

mpatrol doesn't detect any problems (and yet there is one... _somewhere_).

I'm wondering if the normal dynamic memory allocation/deallocations
functions on my system (which are used by vlc) are thread-safe. I run RH7.0
(which has libc.so.6). Is anyone aware of any systems that vlc may be
expected to run on that don't have thread-safe memory
allocation/deallocation functions? (If so, vlc should probably provide
replacement functions which use mutexes.)


More information about the vlc-devel mailing list