Re: [libav-devel] [PATCH] lavu: fix memory leaks by using a mutex instead of atomics

2014-11-14 Thread Janne Grunau
On 2014-11-14 11:38:09 +0100, Anton Khirnov wrote: > Quoting wm4 (2014-11-11 17:26:47) > > Thank you for debugging this. > > The patch look mostly fine, the only part I'm not sure of is this. > > One point is that you have to call w32thread_init() with win32 > threads. Technically calling w32t

Re: [libav-devel] [PATCH] lavu: fix memory leaks by using a mutex instead of atomics

2014-11-14 Thread Martin Storsjö
On Fri, 14 Nov 2014, Anton Khirnov wrote: The patch look mostly fine, the only part I'm not sure of is this. One point is that you have to call w32thread_init() with win32 threads. Actually, w32thread_init only initializes the condition variable part, so the mutex wrappers should work fine w

Re: [libav-devel] [PATCH] lavu: fix memory leaks by using a mutex instead of atomics

2014-11-14 Thread wm4
On Fri, 14 Nov 2014 11:38:09 +0100 Anton Khirnov wrote: > Quoting wm4 (2014-11-11 17:26:47) > > The buffer pool has to atomically add and remove entries from the linked > > list of available buffers. This was done by removing the entire list > > with a CAS operation, working on it, and then setti

Re: [libav-devel] [PATCH] lavu: fix memory leaks by using a mutex instead of atomics

2014-11-14 Thread Anton Khirnov
Quoting wm4 (2014-11-11 17:26:47) > The buffer pool has to atomically add and remove entries from the linked > list of available buffers. This was done by removing the entire list > with a CAS operation, working on it, and then setting it back again > (using a retry-loop in case another thread was

[libav-devel] [PATCH] lavu: fix memory leaks by using a mutex instead of atomics

2014-11-11 Thread wm4
The buffer pool has to atomically add and remove entries from the linked list of available buffers. This was done by removing the entire list with a CAS operation, working on it, and then setting it back again (using a retry-loop in case another thread was doing the same thing). This could effecti