1. 22 Mar, 2017 1 commit
    • Clément Bœsch's avatar
      lavu/buffer: drop USE_ATOMICS · 67d8eabd
      Clément Bœsch authored
      USE_ATOMICS is only set if there is no thread implementation enabled, in
      which case you can't expect any lock mechanism from FFmpeg.
      
      This is also conflicting with the incoming use of stdatomic.
      67d8eabd
  2. 02 Oct, 2016 1 commit
  3. 03 Aug, 2016 1 commit
  4. 14 Feb, 2016 1 commit
  5. 12 Mar, 2015 2 commits
  6. 23 Jan, 2015 1 commit
  7. 06 Dec, 2014 1 commit
  8. 29 Nov, 2014 1 commit
  9. 27 Nov, 2014 1 commit
    • wm4's avatar
      lavu: fix memory leaks by using a mutex instead of atomics · fbd6c97f
      wm4 authored
      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 effectively cause memory leaks: while a thread was working on
      the buffer list, other threads would allocate new buffers, increasing
      the pool's total size. There was no real leak, but since these extra
      buffers were not needed, but not free'd either (except when the buffer
      pool was destroyed), this had the same effects as a real leak. For some
      reason, growth was exponential, and could easily kill the process due
      to OOM in real-world uses.
      
      Fix this by using a mutex to protect the list operations. The fancy
      way atomics remove the whole list to work on it is not needed anymore,
      which also avoids the situation which was causing the leak.
      Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
      fbd6c97f
  10. 06 Mar, 2014 1 commit
  11. 25 Feb, 2014 1 commit
  12. 13 May, 2013 1 commit
  13. 30 Mar, 2013 1 commit
  14. 29 Mar, 2013 1 commit
  15. 24 Mar, 2013 2 commits
  16. 19 Mar, 2013 1 commit
  17. 18 Mar, 2013 1 commit
    • Michael Niedermayer's avatar
      avutil/buffer: Fix race in pool. · cea3a63b
      Michael Niedermayer authored
      This race will always happen sooner or later in a multi-threaded
      environment and it will over time lead to OOM.
      This fix works by spinning, there are other ways by which this
      can be fixed, like simply detecting the issue after it happened
      and freeing the over-allocated memory or simply using a mutex.
      Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
      cea3a63b
  18. 17 Mar, 2013 2 commits
  19. 12 Mar, 2013 1 commit
  20. 08 Mar, 2013 2 commits