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

libavformat/avidec.c:1299:17: Call
1297.         if (ast) {
1298.             if (ast->sub_ctx) {
1299.                 av_freep(&ast->sub_ctx->pb);
                      ^
1300.                 av_close_input_stream(ast->sub_ctx);
1301.             }

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

libavformat/avidec.c:1300:17: Call
1298.             if (ast->sub_ctx) {
1299.                 av_freep(&ast->sub_ctx->pb);
1300.                 av_close_input_stream(ast->sub_ctx);
                      ^
1301.             }
1302.             av_free(ast->sub_buffer);

libavformat/utils.c:2445:1: <LHS trace>
2443. }
2444. 
2445. void av_close_input_stream(AVFormatContext *s)
      ^
2446. {
2447.     int i;

libavformat/utils.c:2445:1: Parameter `s->nb_chapters`
  2443. }
  2444. 
  2445. void av_close_input_stream(AVFormatContext *s)
        ^
  2446. {
  2447.     int i;

libavformat/utils.c:2481:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `av_close_input_stream` 
  2479.     flush_packet_queue(s);
  2480.     av_freep(&s->priv_data);
  2481.     while(s->nb_chapters--) {
                  ^
  2482. #if FF_API_OLD_METADATA
  2483.         av_free(s->chapters[s->nb_chapters]->title);
