From cac651c83417dde3b64a6620cac32f078c9c399f Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 29 Aug 2011 07:11:57 +0200 Subject: cmdutils: move grow_array() from avconv to cmdutils. --- cmdutils.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmdutils.h') diff --git a/cmdutils.h b/cmdutils.h index 65b1ae48b7..2173f0d34b 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -333,4 +333,14 @@ int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, */ void exit_program(int ret); +/** + * Realloc array to hold new_size elements of elem_size. + * Calls exit_program() on failure. + * + * @param elem_size size in bytes of each element + * @param size new element count will be written here + * @return reallocated array + */ +void *grow_array(void *array, int elem_size, int *size, int new_size); + #endif /* LIBAV_CMDUTILS_H */ -- cgit v1.2.3