Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-24Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt
Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19avutil/buffer: Avoid allocation of AVBuffer when using buffer poolAndreas Rheinhardt
Do this by putting an AVBuffer structure into BufferPoolEntry and reuse it for all subsequent uses of said BufferPoolEntry. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt
Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-11avutil/buffer_internal: Include internal for buffer_size_tAndreas Rheinhardt
Fixes checkheaders. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11avutil/buffer: change public function and struct size parameter types to size_tJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05avutil/buffer: separate public and internal flags inside AVBuffersJames Almer
It's better to not mix user provided flags and internal flags set by AVBufferRef helper functions. Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-22Merge commit '27079a426c9d3db918b158976e44b9b143d78e1c'Clément Bœsch
* commit '27079a426c9d3db918b158976e44b9b143d78e1c': buffer: convert to stdatomic Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22lavu/buffer: drop USE_ATOMICSClément Bœsch
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.
2016-10-02buffer: convert to stdatomicAnton Khirnov
2016-02-17Merge commit '721a4efc0545548a241080b53ab480e34f366240'Derek Buitenhuis
* commit '721a4efc0545548a241080b53ab480e34f366240': buffer: add support for pools using caller data in allocation Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-14buffer: add support for pools using caller data in allocationAnton Khirnov
This should allow using more complex allocators than simple malloc wrappers.
2014-11-28Merge commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83'Michael Niedermayer
* commit 'fbd6c97f9ca858140df16dd07200ea0d4bdc1a83': lavu: fix memory leaks by using a mutex instead of atomics Conflicts: libavutil/buffer.c The atomics code is left in place as a fallback for synchronization in the absence of p/w32 threads. Our ABI did not requires applications to only use threads (and matching ones) to what libavutil was build with Our code also was not affected by the leak this change fixes, though no question the atomics based implementation is not pretty at all. First and foremost the code must work, being pretty comes after that. If this causes problems, for example when libavutil is used by multiple applications each using a different kind of threading system then the default possibly has to be changed to the uglier atomics. See: cea3a63ba3d89d8403eef008f7a7c54d645cff70 Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-27lavu: fix memory leaks by using a mutex instead of atomicswm4
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: Anton Khirnov <anton@khirnov.net>
2013-03-18avutil/buffer: Fix race in pool.Michael Niedermayer
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: Michael Niedermayer <michaelni@gmx.at>
2013-03-08Merge commit '1cec0624d0e6f48590283a57169b58b9fe8449d3'Michael Niedermayer
* commit '1cec0624d0e6f48590283a57169b58b9fe8449d3': AVBuffer: add a new API for buffer pools Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08Merge commit '8e401dbe90cc77b1f3067a917d9fa48cefa3fcdb'Michael Niedermayer
* commit '8e401dbe90cc77b1f3067a917d9fa48cefa3fcdb': lavu: add a new API for reference-counted data buffers. Conflicts: libavutil/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08AVBuffer: add a new API for buffer poolsAnton Khirnov
2013-03-08lavu: add a new API for reference-counted data buffers.Anton Khirnov