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

ffmpeg.c:512:9: Call
510.         if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
511.             avio_close(s->pb);
512.         avformat_free_context(s);
             ^
513.         av_free(output_streams_for_file[i]);
514.     }

libavformat/utils.c:2573:1: <LHS trace>
2571. }
2572. 
2573. void avformat_free_context(AVFormatContext *s)
      ^
2574. {
2575.     int i;

libavformat/utils.c:2573:1: Parameter `s->nb_programs`
  2571. }
  2572. 
  2573. void avformat_free_context(AVFormatContext *s)
        ^
  2574. {
  2575.     int i;

libavformat/utils.c:2597:9: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_free_context` 
  2595.         av_free(st);
  2596.     }
  2597.     for(i=s->nb_programs-1; i>=0; i--) {
                ^
  2598. #if FF_API_OLD_METADATA
  2599.         av_freep(&s->programs[i]->provider_name);
