Re: [FFmpeg-devel] [PATCH] avutil/threadmessage: fix condition broadcasting

2015-12-01 Thread Nicolas George
Le primidi 11 frimaire, an CCXXIV, Clement Boesch a écrit : > The fix is simply to make sure to notify everyone when work is done (be > it reading or writing). Another solution would be to use 2 distincts > conditions. Another solution would be to document that this API does not support interleavi

[FFmpeg-devel] [PATCH] avutil/threadmessage: fix condition broadcasting

2015-12-01 Thread Clément Bœsch
From: Clément Bœsch Fix a dead lock under certain conditions. Let's assume we have a queue of 1 message max, 2 senders, and 1 receiver. Scenario (real record obtained with debug added): [...] SENDER #0: acquired lock SENDER #0: queue is full, wait SENDER #1: acquired lock SEN