mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-05-01 03:56:53 +08:00
Move av_fast_{m,re}alloc from lavc to lavu.
This commit is contained in:
+4
-21
@@ -36,6 +36,10 @@
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/frame.h"
|
||||
#include "libavutil/log.h"
|
||||
#if FF_API_FAST_MALLOC
|
||||
// to provide fast_*alloc
|
||||
#include "libavutil/mem.h"
|
||||
#endif
|
||||
#include "libavutil/pixfmt.h"
|
||||
#include "libavutil/rational.h"
|
||||
|
||||
@@ -4197,27 +4201,6 @@ AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
|
||||
|
||||
/* memory */
|
||||
|
||||
/**
|
||||
* Reallocate the given block if it is not large enough, otherwise do nothing.
|
||||
*
|
||||
* @see av_realloc
|
||||
*/
|
||||
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
|
||||
|
||||
/**
|
||||
* Allocate a buffer, reusing the given one if large enough.
|
||||
*
|
||||
* Contrary to av_fast_realloc the current buffer contents might not be
|
||||
* preserved and on error the old buffer is freed, thus no special
|
||||
* handling to avoid memleaks is necessary.
|
||||
*
|
||||
* @param ptr pointer to pointer to already allocated buffer, overwritten with pointer to new buffer
|
||||
* @param size size of the buffer *ptr points to
|
||||
* @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and
|
||||
* *size 0 if an error occurred.
|
||||
*/
|
||||
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
|
||||
|
||||
/**
|
||||
* Allocate a buffer with padding, reusing the given one if large enough.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user