ffmpeg.c:3740: error: Integer Overflow L2
  ([1, 2147483648] × 4):signed32 by call to `grow_array`.

ffmpeg.c:3739:11: Call
3737.     }
3738.     *p++ = '\0';
3739.     idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
                ^
3740.     streamid_map = grow_array(streamid_map, sizeof(*streamid_map), &nb_streamid_map, idx+1);
3741.     streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);

cmdutils.c:106:1: Parameter `min`
  104. }
  105. 
  106. double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
       ^
  107. {
  108.     char *tail;

cmdutils.c:120:9: Assignment
  118.         error= "Expected int for %s but found %s\n";
  119.     else
  120.         return d;
               ^
  121.     fprintf(stderr, error, context, numstr, min, max);
  122.     exit(1);

ffmpeg.c:3739:5: Assignment
3737.     }
3738.     *p++ = '\0';
3739.     idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
          ^
3740.     streamid_map = grow_array(streamid_map, sizeof(*streamid_map), &nb_streamid_map, idx+1);
3741.     streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);

ffmpeg.c:3740:20: Call
3738.     *p++ = '\0';
3739.     idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, INT_MAX);
3740.     streamid_map = grow_array(streamid_map, sizeof(*streamid_map), &nb_streamid_map, idx+1);
                         ^
3741.     streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);
3742.     return 0;

ffmpeg.c:513:1: <LHS trace>
511. 
512. /* similar to ff_dynarray_add() and av_fast_realloc() */
513. static void *grow_array(void *array, int elem_size, int *size, int new_size)
     ^
514. {
515.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:513:1: Parameter `new_size`
  511. 
  512. /* similar to ff_dynarray_add() and av_fast_realloc() */
  513. static void *grow_array(void *array, int elem_size, int *size, int new_size)
       ^
  514. {
  515.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:513:1: <RHS trace>
511. 
512. /* similar to ff_dynarray_add() and av_fast_realloc() */
513. static void *grow_array(void *array, int elem_size, int *size, int new_size)
     ^
514. {
515.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:513:1: Parameter `elem_size`
  511. 
  512. /* similar to ff_dynarray_add() and av_fast_realloc() */
  513. static void *grow_array(void *array, int elem_size, int *size, int new_size)
       ^
  514. {
  515.     if (new_size >= INT_MAX / elem_size) {

ffmpeg.c:520:24: Binary operation: ([1, 2147483648] × 4):signed32 by call to `grow_array` 
  518.     }
  519.     if (*size < new_size) {
  520.         uint8_t *tmp = av_realloc(array, new_size*elem_size);
                              ^
  521.         if (!tmp) {
  522.             fprintf(stderr, "Could not alloc buffer.\n");
