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.             url_fclose(s->pb);
512.         avformat_free_context(s);
             ^
513.         av_free(output_streams_for_file[i]);
514.     }

libavformat/utils.c:2565:1: <LHS trace>
2563. }
2564. 
2565. void avformat_free_context(AVFormatContext *s)
      ^
2566. {
2567.     int i;

libavformat/utils.c:2565:1: Parameter `s->nb_programs`
  2563. }
  2564. 
  2565. void avformat_free_context(AVFormatContext *s)
        ^
  2566. {
  2567.     int i;

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