diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-03 14:34:47 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-05 13:27:38 +0100 |
commit | 2e7ef008e312bde7c151034628adc2da04313566 (patch) | |
tree | 501f672547c0a2d4f6b5e05e347b083db21cd958 /fftools/cmdutils.h | |
parent | 9d73967b40231b27504cb86ea177887be03bb328 (diff) | |
download | ffmpeg-2e7ef008e312bde7c151034628adc2da04313566.tar.gz |
fftools/cmdutils: Make allocate_array_elem() return ptr to new element
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools/cmdutils.h')
-rw-r--r-- | fftools/cmdutils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index ae78e60f4c..82cda208be 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -638,7 +638,7 @@ void *grow_array(void *array, int elem_size, int *size, int new_size); * @param elem_size size of the new element to allocate * @param nb_elems pointer to the number of elements of the array array; * *nb_elems will be incremented by one by this function. - * @return reallocated array + * @return pointer to the newly allocated entry */ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); @@ -648,7 +648,7 @@ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) #define ALLOC_ARRAY_ELEM(array, nb_elems)\ - array = allocate_array_elem(array, sizeof(*array[0]), &nb_elems) + allocate_array_elem(&array, sizeof(*array[0]), &nb_elems) #define GET_PIX_FMT_NAME(pix_fmt)\ const char *name = av_get_pix_fmt_name(pix_fmt); |