libavformat/segment.c:130: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avformat_free_context`.

libavformat/segment.c:130:9: Call
128. 
129.     if (write_header) {
130.         avformat_free_context(oc);
             ^
131.         c->avf = NULL;
132.         if ((err = segment_mux_init(s)) < 0)

libavformat/utils.c:2477:1: <LHS trace>
2475. }
2476. 
2477. void avformat_free_context(AVFormatContext *s)
      ^
2478. {
2479.     int i;

libavformat/utils.c:2477:1: Parameter `s->nb_programs`
  2475. }
  2476. 
  2477. void avformat_free_context(AVFormatContext *s)
        ^
  2478. {
  2479.     int i;

libavformat/utils.c:2491:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_free_context` 
  2489.         free_stream(&s->streams[i]);
  2490. 
  2491.     for (i = s->nb_programs - 1; i >= 0; i--) {
                 ^
  2492.         av_dict_free(&s->programs[i]->metadata);
  2493.         av_freep(&s->programs[i]->stream_index);
