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

libavformat/segment.c:217:15: Call
215.     SegmentContext *seg = s->priv_data;
216.     AVFormatContext *oc = seg->avf;
217.     int ret = segment_end(oc);
                   ^
218.     if (seg->list)
219.         avio_close(seg->pb);

libavformat/segment.c:71:1: Parameter `*oc->packet_buffer->next`
  69. }
  70. 
  71. static int segment_end(AVFormatContext *oc)
      ^
  72. {
  73.     int ret = 0;

libavformat/segment.c:75:5: Call
  73.     int ret = 0;
  74. 
  75.     av_write_trailer(oc);
          ^
  76.     avio_close(oc->pb);
  77. 

libavformat/mux.c:565:1: Parameter `*s->packet_buffer->next`
    563. }
    564. 
    565. int av_write_trailer(AVFormatContext *s)
         ^
    566. {
    567.     int ret, i;

libavformat/mux.c:571:15: Call
    569.     for (;; ) {
    570.         AVPacket pkt;
    571.         ret = interleave_packet(s, &pkt, NULL, 1);
                       ^
    572.         if (ret < 0) //FIXME cleanup needed for ret<0 ?
    573.             goto fail;

libavformat/mux.c:513:1: Parameter `*s->packet_buffer->next`
      511.  *         < 0 if an error occurred
      512.  */
      513. static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush)
           ^
      514. {
      515.     if (s->oformat->interleave_packet) {

libavformat/segment.c:220:5: Call
218.     if (seg->list)
219.         avio_close(seg->pb);
220.     avformat_free_context(oc);
         ^
221.     return ret;
222. }

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_chapters`
  2621. }
  2622. 
  2623. void avformat_free_context(AVFormatContext *s)
        ^
  2624. {
  2625.     int i;

libavformat/utils.c:2656:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_free_context` 
  2654.     av_freep(&s->programs);
  2655.     av_freep(&s->priv_data);
  2656.     while(s->nb_chapters--) {
                  ^
  2657.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
  2658.         av_free(s->chapters[s->nb_chapters]);
