[ffmpeg-devel] question about SDL_LockMutex in ffplay
zuo bf
zuobf.bupt
Fri Jul 8 12:06:14 CEST 2005
Hi all,
I am really confused with the SDL_LockMutex used in ffplay, I noticed that
when some one want to access a shared resource, it first locked it, but then
waiting
for another one to modify it, and if the other one want to modify it, it
must first lock
it too, but shouldn't a mutex can only be locked one time at the same time ?
With some printf output, i found that every mutex can be locked twice, it
that the
correct behaviour ?
If a lock the mutex twice such as in function queue_picture, then when it
needs to
SDL_CondWait, there is no chance others to acquire the mutex, so others
can't SDL_CondSignal
it.
Any help would be greatly appreciated.
Thx!
More information about the ffmpeg-devel
mailing list