MCPcopy Index your code
hub / github.com/byhook/ffmpeg4android / grow_array

Function grow_array

ffmpeg-single-cmd/src/main/cpp/cmdutils.c:2080–2097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2078}
2079
2080void *grow_array(void *array, int elem_size, int *size, int new_size)
2081{
2082 if (new_size >= INT_MAX / elem_size) {
2083 av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
2084 exit_program(1);
2085 }
2086 if (*size < new_size) {
2087 uint8_t *tmp = av_realloc_array(array, new_size, elem_size);
2088 if (!tmp) {
2089 av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
2090 exit_program(1);
2091 }
2092 memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
2093 *size = new_size;
2094 return tmp;
2095 }
2096 return array;
2097}
2098
2099double get_rotation(AVStream *st)
2100{

Callers 2

opt_streamidFunction · 0.85
write_optionFunction · 0.85

Calls 1

exit_programFunction · 0.85

Tested by

no test coverage detected