ffmpeg.c:458: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avformat_free_context`.

ffmpeg.c:458:9: Call
456.         if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
457.             avio_close(s->pb);
458.         avformat_free_context(s);
             ^
459.         av_free(output_streams_for_file[i]);
460.         av_dict_free(&output_opts[i]);

libavformat/utils.c:2645:1: <LHS trace>
2643. #endif
2644. 
2645. void avformat_free_context(AVFormatContext *s)
      ^
2646. {
2647.     int i;

libavformat/utils.c:2645:1: Parameter `s->nb_programs`
  2643. #endif
  2644. 
  2645. void avformat_free_context(AVFormatContext *s)
        ^
  2646. {
  2647.     int i;

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