MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / add_crc_to_array

Function add_crc_to_array

tests/api/api-seek-test.c:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36int number_of_elements;
37
38static int add_crc_to_array(uint32_t crc, int64_t pts)
39{
40 if (size_of_array <= number_of_elements) {
41 if (size_of_array == 0)
42 size_of_array = 10;
43 size_of_array *= 2;
44 crc_array = av_realloc_f(crc_array, size_of_array, sizeof(uint32_t));
45 pts_array = av_realloc_f(pts_array, size_of_array, sizeof(int64_t));
46 if ((crc_array == NULL) || (pts_array == NULL)) {
47 av_log(NULL, AV_LOG_ERROR, "Can't allocate array to store crcs\n");
48 return AVERROR(ENOMEM);
49 }
50 }
51 crc_array[number_of_elements] = crc;
52 pts_array[number_of_elements] = pts;
53 number_of_elements++;
54 return 0;
55}
56
57static int compare_crc_in_array(uint32_t crc, int64_t pts)
58{

Callers 1

compute_crc_of_packetsFunction · 0.85

Calls 2

av_realloc_fFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected