summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/mem.c
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-10-01 15:25:04 +0200
committerGitHub <noreply@github.com>2018-10-01 15:25:04 +0200
commit45c24f05d023a2cd8289ed40a13708392ce2e6a4 (patch)
treefef75d382fc6216a093eeaf80560473dff19d883 /media/ffvpx/libavutil/mem.c
parent79b00fc33b5cb6d56d29b50efac6d62ce3a89018 (diff)
downloadUXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar
UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.gz
UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.lz
UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.tar.xz
UXP-45c24f05d023a2cd8289ed40a13708392ce2e6a4.zip
Revert "Update ffvpx code to 4.0.2"
Diffstat (limited to 'media/ffvpx/libavutil/mem.c')
-rw-r--r--media/ffvpx/libavutil/mem.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/media/ffvpx/libavutil/mem.c b/media/ffvpx/libavutil/mem.c
index 6149755a6..36740f115 100644
--- a/media/ffvpx/libavutil/mem.c
+++ b/media/ffvpx/libavutil/mem.c
@@ -61,7 +61,7 @@ void free(void *ptr);
#include "mem_internal.h"
-#define ALIGN (HAVE_AVX512 ? 64 : (HAVE_AVX ? 32 : 16))
+#define ALIGN (HAVE_AVX ? 32 : 16)
/* NOTE: if you want to override these functions with your own
* implementations (not recommended) you have to link libav* as
@@ -181,20 +181,6 @@ int av_reallocp(void *ptr, size_t size)
return 0;
}
-void *av_malloc_array(size_t nmemb, size_t size)
-{
- if (!size || nmemb >= INT_MAX / size)
- return NULL;
- return av_malloc(nmemb * size);
-}
-
-void *av_mallocz_array(size_t nmemb, size_t size)
-{
- if (!size || nmemb >= INT_MAX / size)
- return NULL;
- return av_mallocz(nmemb * size);
-}
-
void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
{
if (!size || nmemb >= INT_MAX / size)
@@ -463,15 +449,10 @@ void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
{
- if (min_size <= *size)
+ if (min_size < *size)
return ptr;
- if (min_size > max_alloc_size - 32) {
- *size = 0;
- return NULL;
- }
-
- min_size = FFMIN(max_alloc_size - 32, FFMAX(min_size + min_size / 16 + 32, min_size));
+ min_size = FFMAX(min_size + min_size / 16 + 32, min_size);
ptr = av_realloc(ptr, min_size);
/* we could set this to the unmodified min_size but this is safer