Quoting Zhao Zhili (2024-11-27 08:42:34) > > > >> + > >> + ff_mutex_unlock(&s->input_mutex); > >> + ff_cond_signal(&s->input_cond); > > > > This looks wrong - you should signal while holding the mutex, otherwise > > the consumer may miss the signal. Same for the other two signalling > > sites. > > How? The Linux Programming Interface 30.2.2: > > We conclude with one final observation about the use of pthread_cond_signal() > (and pthread_cond_broadcast()). In the producer code shown earlier, we called > pthread_mutex_unlock(), and then called pthread_cond_signal(); that is, we > first unlocked > the mutex associated with the shared variable, and then signaled the > corresponding > condition variable. We could have reversed these two steps; SUSv3 permits > them to > be done in either order.
Okay, I guess it's not a problem. Ignore the comment then. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".