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

libavformat/segment.c:174:9: Assignment
172.     if (ret) {
173.         oc->streams = NULL;
174.         oc->nb_streams = 0;
             ^
175.         if (seg->list)
176.             avio_close(seg->pb);

libavformat/segment.c:177:9: Call
175.         if (seg->list)
176.             avio_close(seg->pb);
177.         avformat_free_context(oc);
             ^
178.     }
179.     return ret;

libavformat/utils.c:2650:1: <LHS trace>
2648. #endif
2649. 
2650. void avformat_free_context(AVFormatContext *s)
      ^
2651. {
2652.     int i;

libavformat/utils.c:2650:1: Parameter `s->nb_chapters`
  2648. #endif
  2649. 
  2650. void avformat_free_context(AVFormatContext *s)
        ^
  2651. {
  2652.     int i;

libavformat/utils.c:2682:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_free_context` 
  2680.     av_freep(&s->programs);
  2681.     av_freep(&s->priv_data);
  2682.     while(s->nb_chapters--) {
                  ^
  2683.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
  2684.         av_free(s->chapters[s->nb_chapters]);
