| 36 | int number_of_elements; |
| 37 | |
| 38 | static 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 | |
| 57 | static int compare_crc_in_array(uint32_t crc, int64_t pts) |
| 58 | { |
no test coverage detected