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

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

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

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

libavformat/utils.c:2594:1: Parameter `(*ps)->nb_chapters`
  2592. #endif
  2593. 
  2594. void avformat_close_input(AVFormatContext **ps)
        ^
  2595. {
  2596.     AVFormatContext *s = *ps;

libavformat/utils.c:2602:5: Call
  2600.     if (s->iformat->read_close)
  2601.         s->iformat->read_close(s);
  2602.     avformat_free_context(s);
            ^
  2603.     *ps = NULL;
  2604.     if (pb)

libavformat/utils.c:2545:1: <LHS trace>
2543. }
2544. 
2545. void avformat_free_context(AVFormatContext *s)
      ^
2546. {
2547.     int i;

libavformat/utils.c:2545:1: Parameter `s->nb_chapters`
    2543. }
    2544. 
    2545. void avformat_free_context(AVFormatContext *s)
          ^
    2546. {
    2547.     int i;

libavformat/utils.c:2577:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2575.     av_freep(&s->programs);
    2576.     av_freep(&s->priv_data);
    2577.     while(s->nb_chapters--) {
                    ^
    2578.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2579.         av_free(s->chapters[s->nb_chapters]);
