Commit d2838f09 authored by Michael Niedermayer's avatar Michael Niedermayer

cmdutils.c: Use av_realloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ea7af58f
...@@ -2060,7 +2060,7 @@ void *grow_array(void *array, int elem_size, int *size, int new_size) ...@@ -2060,7 +2060,7 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
exit_program(1); exit_program(1);
} }
if (*size < new_size) { if (*size < new_size) {
uint8_t *tmp = av_realloc(array, new_size*elem_size); uint8_t *tmp = av_realloc_array(array, new_size, elem_size);
if (!tmp) { if (!tmp) {
av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
exit_program(1); exit_program(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment