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

libavformat/segment.c:82:9: Call
80. 
81.     if (write_header) {
82.         avformat_free_context(oc);
            ^
83.         c->avf = NULL;
84.         if ((err = segment_mux_init(s)) < 0)

libavformat/utils.c:2623:1: <LHS trace>
2621. }
2622. 
2623. void avformat_free_context(AVFormatContext *s)
      ^
2624. {
2625.     int i;

libavformat/utils.c:2623:1: Parameter `s->nb_programs`
  2621. }
  2622. 
  2623. void avformat_free_context(AVFormatContext *s)
        ^
  2624. {
  2625.     int i;

libavformat/utils.c:2649:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_free_context` 
  2647.         av_free(st);
  2648.     }
  2649.     for(i=s->nb_programs-1; i>=0; i--) {
                ^
  2650.         av_dict_free(&s->programs[i]->metadata);
  2651.         av_freep(&s->programs[i]->stream_index);
