aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffmpeg-0.8/libavutil
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-04-22 00:04:30 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-04-22 00:04:30 +0000
commit56bef797506f7570090a3b144256e41185299408 (patch)
treecf4120dfb8357d29b08ae421c5f2f96395388dc9 /src/lib/ffmpeg-0.8/libavutil
parentc8313d75d266318354df56ed5beb11e5a8ac3f7f (diff)
downloadusdx-56bef797506f7570090a3b144256e41185299408.tar.gz
usdx-56bef797506f7570090a3b144256e41185299408.tar.xz
usdx-56bef797506f7570090a3b144256e41185299408.zip
check of avutil. avio, avformat and avcodec still to do.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2862 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib/ffmpeg-0.8/libavutil')
-rw-r--r--src/lib/ffmpeg-0.8/libavutil/cpu.pas2
-rw-r--r--src/lib/ffmpeg-0.8/libavutil/log.pas7
-rw-r--r--src/lib/ffmpeg-0.8/libavutil/mem.pas54
-rw-r--r--src/lib/ffmpeg-0.8/libavutil/pixfmt.pas4
4 files changed, 55 insertions, 12 deletions
diff --git a/src/lib/ffmpeg-0.8/libavutil/cpu.pas b/src/lib/ffmpeg-0.8/libavutil/cpu.pas
index 56c04064..e300d259 100644
--- a/src/lib/ffmpeg-0.8/libavutil/cpu.pas
+++ b/src/lib/ffmpeg-0.8/libavutil/cpu.pas
@@ -19,7 +19,7 @@
* - Changes and updates by the UltraStar Deluxe Team
*
* Conversion of libavutil/cpu.h
- * avutil version 50.43.0
+ * avutil version 51.9.1
*
*)
diff --git a/src/lib/ffmpeg-0.8/libavutil/log.pas b/src/lib/ffmpeg-0.8/libavutil/log.pas
index f2df66f0..8060b0cb 100644
--- a/src/lib/ffmpeg-0.8/libavutil/log.pas
+++ b/src/lib/ffmpeg-0.8/libavutil/log.pas
@@ -19,7 +19,7 @@
* - Changes and updates by the UltraStar Deluxe Team
*
* Conversion of libavutil/log.h
- * avutil version 50.43.0
+ * avutil version 51.9.1
*
*)
@@ -46,7 +46,7 @@ type
* A pointer to a function which returns the name of a context
* instance ctx associated with the class.
*)
- item_name: function(): PAnsiChar; cdecl;
+ item_name: function(ctx: pointer): PAnsiChar; cdecl;
(**
* a pointer to the first option specified in the class if any or NULL
@@ -80,7 +80,8 @@ type
* A function for extended searching, e.g. in possible
* children objects.
*)
- opt_find: function(): PAVOption; cdecl;
+ opt_find: function(obj: pointer; name: {const} PAnsiChar; unit: {const} PAnsiChar;
+ opt_flags: cint; search_flags: cint): PAVOption; cdecl;
end;
diff --git a/src/lib/ffmpeg-0.8/libavutil/mem.pas b/src/lib/ffmpeg-0.8/libavutil/mem.pas
index b68dd310..322a8657 100644
--- a/src/lib/ffmpeg-0.8/libavutil/mem.pas
+++ b/src/lib/ffmpeg-0.8/libavutil/mem.pas
@@ -29,9 +29,6 @@
*)
(* memory handling functions *)
-
-type
- FF_INTERNAL_MEM_TYPE = cuint;
(**
* Allocate a block of size bytes with alignment suitable for all
@@ -41,7 +38,7 @@ type
* be allocated.
* @see av_mallocz()
*)
-function av_malloc(size: FF_INTERNAL_MEM_TYPE): pointer;
+function av_malloc(size: size_t): pointer;
cdecl; external av__util; {av_malloc_attrib av_alloc_size(1)}
(**
@@ -56,10 +53,23 @@ function av_malloc(size: FF_INTERNAL_MEM_TYPE): pointer;
* cannot be allocated or the function is used to free the memory block.
* @see av_fast_realloc()
*)
-function av_realloc(ptr: pointer; size: FF_INTERNAL_MEM_TYPE): pointer;
+function av_realloc(ptr: pointer; size: size_t): pointer;
cdecl; external av__util; {av_alloc_size(2)}
(**
+ * Allocate or reallocate a block of memory.
+ * This function does the same thing as av_realloc, except:
+ * - It takes two arguments and checks the result of the multiplication for
+ * integer overflow.
+ * - It frees the input block in case of failure, thus avoiding the memory
+ * leak with the classic "buf = realloc(buf); if (!buf) return -1;".
+ *)
+{ available only in 0.8.5 - 0.8.10
+function av_realloc_f(ptr: pointer; nelem: size_t; size: size_t): pointer;
+ cdecl; external av__util;
+}
+
+(**
* Free a memory block which has been allocated with av_malloc(z)() or
* av_realloc().
* @param ptr Pointer to the memory block which should be freed.
@@ -78,10 +88,25 @@ procedure av_free(ptr: pointer);
* @return Pointer to the allocated block, NULL if it cannot be allocated.
* @see av_malloc()
*)
-function av_mallocz(size: FF_INTERNAL_MEM_TYPE): pointer;
+function av_mallocz(size: size_t): pointer;
cdecl; external av__util; {av_malloc_attrib av_alloc_size(1)}
(**
+ * Allocate a block of nmemb * size bytes with alignment suitable for all
+ * memory accesses (including vectors if available on the CPU) and
+ * zero all the bytes of the block.
+ * The allocation will fail if nmemb * size is greater than or equal
+ * to INT_MAX.
+ * @param nmemb
+ * @param size
+ * @return Pointer to the allocated block, NULL if it cannot be allocated.
+ *)
+{ available only in 0.8.5 - 0.8.10
+function av_calloc(nmemb: size_t; size: size_t): pointer;
+ cdecl; external av__util; {av_malloc_attrib}
+}
+
+(**
* Duplicate the string s.
* @param s string to be duplicated.
* @return Pointer to a newly allocated string containing a
@@ -109,3 +134,20 @@ procedure av_freep (ptr: pointer);
*)
procedure av_dynarray_add(tab_ptr: pointer; nb_ptr: PCint; elem: pointer);
cdecl; external av__util;
+
+(**
+ * Multiply two size_t values checking for overflow.
+ * @return 0 if success, AVERROR(EINVAL) if overflow.
+ *)
+{ available only in 0.8.5 - 0.8.10
+//static inline int av_size_mult(size_t a, size_t b, size_t *r)
+}
+{
+ size_t t = a * b;
+ /* Hack inspired from glibc: only try the division if nelem and elsize
+ * are both greater than sqrt(SIZE_MAX). */
+ if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
+ return AVERROR(EINVAL);
+ *r = t;
+ return 0;
+}
diff --git a/src/lib/ffmpeg-0.8/libavutil/pixfmt.pas b/src/lib/ffmpeg-0.8/libavutil/pixfmt.pas
index 82288cbb..552d4474 100644
--- a/src/lib/ffmpeg-0.8/libavutil/pixfmt.pas
+++ b/src/lib/ffmpeg-0.8/libavutil/pixfmt.pas
@@ -18,8 +18,8 @@
* This is a part of the Pascal port of ffmpeg.
* - Changes and updates by the UltraStar Deluxe Team
*
- * Conversion of libavutil/mem.h
- * avutil version 50.43.0
+ * Conversion of libavutil/pixfmt.h
+ * avutil version 51.9.1
*
*)