summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/ffvpx/libavutil/mem.c')
-rw-r--r--media/ffvpx/libavutil/mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/media/ffvpx/libavutil/mem.c b/media/ffvpx/libavutil/mem.c
index 8dfaad827..1a8fc21e9 100644
--- a/media/ffvpx/libavutil/mem.c
+++ b/media/ffvpx/libavutil/mem.c
@@ -179,7 +179,7 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize)
return NULL;
}
r = av_realloc(ptr, size);
- if (!r && size)
+ if (!r)
av_free(ptr);
return r;
}
@@ -312,7 +312,7 @@ int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
void **tab;
memcpy(&tab, tab_ptr, sizeof(tab));
- AV_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
+ FF_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
tab[*nb_ptr] = elem;
memcpy(tab_ptr, &tab, sizeof(tab));
}, {
@@ -326,7 +326,7 @@ void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
void **tab;
memcpy(&tab, tab_ptr, sizeof(tab));
- AV_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
+ FF_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
tab[*nb_ptr] = elem;
memcpy(tab_ptr, &tab, sizeof(tab));
}, {
@@ -340,7 +340,7 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
{
uint8_t *tab_elem_data = NULL;
- AV_DYNARRAY_ADD(INT_MAX, elem_size, *tab_ptr, *nb_ptr, {
+ FF_DYNARRAY_ADD(INT_MAX, elem_size, *tab_ptr, *nb_ptr, {
tab_elem_data = (uint8_t *)*tab_ptr + (*nb_ptr) * elem_size;
if (elem_data)
memcpy(tab_elem_data, elem_data, elem_size);