I have seen that no loops are used around the calls of the function "pthread_cond_wait" like in the functions "expWaitForSingleObject" and "avcodec_thread_park_workers".
http://avifile.cvs.sourceforge.net/viewvc/avifile/avifile-0.6/plugins/libwin32/loader/win32.c?revision=1.86&view=markup
http://avifile.cvs.sourceforge.net/viewvc/avifile/avifile-0.6/ffmpeg/libavcodec/pthread.c?revision=1.13&view=markup
Would you like to reuse anything from my message on the topic "spurious wakeup"?
http://groups.google.de/group/comp.programming.threads/msg/bb8299804652fdd7
I have got doubts about your handling of condition variables.
http://en.wikipedia.org/wiki/Monitor_%28synchronization%29#Condition_variables