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

libavformat/segment.c:241:5: Assignment
239.         avio_close(seg->pb);
240.     oc->streams = NULL;
241.     oc->nb_streams = 0;
         ^
242.     avformat_free_context(oc);
243.     return ret;

libavformat/segment.c:242:5: Call
240.     oc->streams = NULL;
241.     oc->nb_streams = 0;
242.     avformat_free_context(oc);
         ^
243.     return ret;
244. }

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