diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-28 22:22:30 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2013-02-28 22:22:30 +0000 |
commit | 2c683643eb26d393e41b54fa050426a9d896a3b3 (patch) | |
tree | 13f7de1f7964d01286ee93a8f984272d38befa62 /src/lib/ffmpeg-1.0/libavutil | |
parent | 92d5d7b531a53bdb474087217eef27ec14a39762 (diff) | |
download | usdx-2c683643eb26d393e41b54fa050426a9d896a3b3.tar.gz usdx-2c683643eb26d393e41b54fa050426a9d896a3b3.tar.xz usdx-2c683643eb26d393e41b54fa050426a9d896a3b3.zip |
update/fix mem.pas
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2961 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib/ffmpeg-1.0/libavutil')
-rw-r--r-- | src/lib/ffmpeg-1.0/libavutil/mem.pas | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/lib/ffmpeg-1.0/libavutil/mem.pas b/src/lib/ffmpeg-1.0/libavutil/mem.pas index 5144b709..af2262ee 100644 --- a/src/lib/ffmpeg-1.0/libavutil/mem.pas +++ b/src/lib/ffmpeg-1.0/libavutil/mem.pas @@ -19,7 +19,7 @@ * - Changes and updates by the UltraStar Deluxe Team * * Conversion of libavutil/mem.h - * avutil version 51.54.100 + * avutil version 51.73.101 * *) @@ -42,6 +42,18 @@ function av_malloc(size: size_t): pointer; cdecl; external av__util; {av_malloc_attrib av_alloc_size(1)} (** + * Helper function to allocate a block of size * nmemb bytes with + * using av_malloc() + * @param nmemb Number of elements + * @param size Size of the single element + * @return Pointer to the allocated block, NULL if the block cannot + * be allocated. + * @see av_malloc() + *) +function av_malloc_array(nmemb: size_t; size: size_t): pointer; {$IFDEF HasInline}inline;{$ENDIF} {av_alloc_size(1,2)} +// Note: defined in avutil.pas + +(** * Allocate or reallocate a block of memory. * If ptr is NULL and size > 0, allocate a new block. If * size is zero, free the memory block pointed to by ptr. @@ -103,6 +115,19 @@ function av_calloc(nmemb: size_t; size: size_t): pointer; cdecl; external av__util; {av_malloc_attrib} (** + * Helper function to allocate a block of size * nmemb bytes with + * using av_mallocz() + * @param nmemb Number of elements + * @param size Size of the single element + * @return Pointer to the allocated block, NULL if the block cannot + * be allocated. + * @see av_mallocz() + * @see av_malloc_array() + *) +function av_mallocz_array(nmemb: size_t; size: size_t): pointer; {$IFDEF HasInline}inline;{$ENDIF} {av_alloc_size(1,2)} +// Note: defined in avutil.pas + +(** * Duplicate the string s. * @param s string to be duplicated. * @return Pointer to a newly allocated string containing a @@ -145,3 +170,11 @@ procedure av_dynarray_add(tab_ptr: pointer; nb_ptr: PCint; elem: pointer); *r = t; return 0; } + +(** + * Set the maximum size that may me allocated in one block. + *) +procedure av_max_alloc(max: size_t); + cdecl; external av__util; + +
\ No newline at end of file |