diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-07 21:52:07 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-12-18 20:11:06 +0100 |
commit | 10bca66101b79954512cd9d8ee20c3bc4513adf3 (patch) | |
tree | fd570266d7e33d169215e376064784a3bb733035 /cmdutils.h | |
parent | 9e696d2e5ffaa763c564682ec18c3b51b3e5fccc (diff) | |
download | ffmpeg-10bca66101b79954512cd9d8ee20c3bc4513adf3.tar.gz |
cmdutils: add a macro to simplify grow_array() calls.
Diffstat (limited to 'cmdutils.h')
-rw-r--r-- | cmdutils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h index 4cb5b8312b..8485a8ba61 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -418,6 +418,9 @@ FILE *get_preset_file(char *filename, size_t filename_size, */ void *grow_array(void *array, int elem_size, int *size, int new_size); +#define GROW_ARRAY(array, nb_elems)\ + array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) + typedef struct FrameBuffer { uint8_t *base[4]; uint8_t *data[4]; |