Go to the documentation of this file.
19 #ifndef AVUTIL_DYNARRAY_H
20 #define AVUTIL_DYNARRAY_H
45 #define AV_DYNARRAY_ADD(av_size_max, av_elt_size, av_array, av_size, \
46 av_success, av_failure) \
48 size_t av_size_new = (av_size); \
49 if (!((av_size) & ((av_size) - 1))) { \
50 av_size_new = (av_size) ? (av_size) << 1 : 1; \
51 if (av_size_new > (av_size_max) / (av_elt_size)) { \
54 void *av_array_new = \
55 av_realloc((av_array), av_size_new * (av_elt_size)); \
59 (av_array) = av_array_new; \