libavformat/avidec.c:1368: error: Integer Overflow L1
  ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input`.

libavformat/avidec.c:1367:17: Call
1365.         if (ast) {
1366.             if (ast->sub_ctx) {
1367.                 av_freep(&ast->sub_ctx->pb);
                      ^
1368.                 avformat_close_input(&ast->sub_ctx);
1369.             }

libavutil/mem.c:151:5: Assignment
  149.     void **ptr= (void**)arg;
  150.     av_free(*ptr);
  151.     *ptr = NULL;
           ^
  152. }
  153. 

libavformat/avidec.c:1368:17: Call
1366.             if (ast->sub_ctx) {
1367.                 av_freep(&ast->sub_ctx->pb);
1368.                 avformat_close_input(&ast->sub_ctx);
                      ^
1369.             }
1370.             av_free(ast->sub_buffer);

libavformat/utils.c:2694:1: Parameter `(*ps)->nb_chapters`
  2692. #endif
  2693. 
  2694. void avformat_close_input(AVFormatContext **ps)
        ^
  2695. {
  2696.     AVFormatContext *s = *ps;

libavformat/utils.c:2702:5: Call
  2700.     if (s->iformat->read_close)
  2701.         s->iformat->read_close(s);
  2702.     avformat_free_context(s);
            ^
  2703.     *ps = NULL;
  2704.     if (pb)

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_chapters`
    2643. #endif
    2644. 
    2645. void avformat_free_context(AVFormatContext *s)
          ^
    2646. {
    2647.     int i;

libavformat/utils.c:2677:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2675.     av_freep(&s->programs);
    2676.     av_freep(&s->priv_data);
    2677.     while(s->nb_chapters--) {
                    ^
    2678.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2679.         av_free(s->chapters[s->nb_chapters]);
