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

libavformat/segment.c:289:15: Call
287.         close_null_ctx(oc->pb);
288.     } else {
289.         ret = segment_end(oc, 1);
                   ^
290.     }
291.     if (seg->list)

libavformat/segment.c:111:1: Parameter `*oc->packet_buffer->next`
  109. }
  110. 
  111. static int segment_end(AVFormatContext *oc, int write_trailer)
       ^
  112. {
  113.     int ret = 0;

libavformat/segment.c:117:9: Call
  115.     av_write_frame(oc, NULL); /* Flush any buffered data (fragmented mp4) */
  116.     if (write_trailer)
  117.         av_write_trailer(oc);
               ^
  118.     avio_close(oc->pb);
  119. 

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:293:5: Call
291.     if (seg->list)
292.         avio_close(seg->pb);
293.     avformat_free_context(oc);
         ^
294.     return ret;
295. }

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]);
