memory allocator. You do not need to suppress this file because the
linker will do it automatically. */
-void *av_malloc(unsigned int size)
+void *av_malloc(FF_INTERNAL_MEM_TYPE size)
{
void *ptr = NULL;
#if CONFIG_MEMALIGN_HACK
return ptr;
}
-void *av_realloc(void *ptr, unsigned int size)
+void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
*ptr = NULL;
}
-void *av_mallocz(unsigned int size)
+void *av_mallocz(FF_INTERNAL_MEM_TYPE size)
{
void *ptr = av_malloc(size);
if (ptr)
#define av_alloc_size(n)
#endif
+#if LIBAVUTIL_VERSION_MAJOR < 51
+# define FF_INTERNAL_MEM_TYPE unsigned int
+#else
+# define FF_INTERNAL_MEM_TYPE size_t
+#endif
+
/**
* Allocate a block of size bytes with alignment suitable for all
* memory accesses (including vectors if available on the CPU).
* be allocated.
* @see av_mallocz()
*/
-void *av_malloc(unsigned int size) av_malloc_attrib av_alloc_size(1);
+void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
/**
* Allocate or reallocate a block of memory.
* cannot be reallocated or the function is used to free the memory block.
* @see av_fast_realloc()
*/
-void *av_realloc(void *ptr, unsigned int size) av_alloc_size(2);
+void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2);
/**
* Free a memory block which has been allocated with av_malloc(z)() or
* @return Pointer to the allocated block, NULL if it cannot be allocated.
* @see av_malloc()
*/
-void *av_mallocz(unsigned int size) av_malloc_attrib av_alloc_size(1);
+void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1);
/**
* Duplicate the string s.