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

libavformat/avidec.c:1384:17: Call
1382.         if (ast) {
1383.             if (ast->sub_ctx) {
1384.                 av_freep(&ast->sub_ctx->pb);
                      ^
1385.                 avformat_close_input(&ast->sub_ctx);
1386.             }

libavutil/mem.c:155:5: Assignment
  153.     void **ptr = (void **)arg;
  154.     av_free(*ptr);
  155.     *ptr = NULL;
           ^
  156. }
  157. 

libavformat/avidec.c:1385:17: Call
1383.             if (ast->sub_ctx) {
1384.                 av_freep(&ast->sub_ctx->pb);
1385.                 avformat_close_input(&ast->sub_ctx);
                      ^
1386.             }
1387.             av_free(ast->sub_buffer);

libavformat/utils.c:2648:1: Parameter `(*ps)->nb_chapters`
  2646. }
  2647. 
  2648. void avformat_close_input(AVFormatContext **ps)
        ^
  2649. {
  2650.     AVFormatContext *s = *ps;

libavformat/utils.c:2664:5: Call
  2662.     }
  2663. 
  2664.     avformat_free_context(s);
            ^
  2665. 
  2666.     *ps = NULL;

libavformat/utils.c:2605:1: <LHS trace>
2603. }
2604. 
2605. void avformat_free_context(AVFormatContext *s)
      ^
2606. {
2607.     int i;

libavformat/utils.c:2605:1: Parameter `s->nb_chapters`
    2603. }
    2604. 
    2605. void avformat_free_context(AVFormatContext *s)
          ^
    2606. {
    2607.     int i;

libavformat/utils.c:2638:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2636.     av_freep(&s->programs);
    2637.     av_freep(&s->priv_data);
    2638.     while(s->nb_chapters--) {
                    ^
    2639.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2640.         av_free(s->chapters[s->nb_chapters]);
