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

libavformat/avidec.c:1356:17: Call
1354.         if (ast) {
1355.             if (ast->sub_ctx) {
1356.                 av_freep(&ast->sub_ctx->pb);
                      ^
1357.                 av_close_input_stream(ast->sub_ctx);
1358.             }

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

libavformat/avidec.c:1357:17: Call
1355.             if (ast->sub_ctx) {
1356.                 av_freep(&ast->sub_ctx->pb);
1357.                 av_close_input_stream(ast->sub_ctx);
                      ^
1358.             }
1359.             av_free(ast->sub_buffer);

libavformat/utils.c:2542:1: <LHS trace>
2540. }
2541. 
2542. void av_close_input_stream(AVFormatContext *s)
      ^
2543. {
2544.     int i;

libavformat/utils.c:2542:1: Parameter `s->nb_chapters`
  2540. }
  2541. 
  2542. void av_close_input_stream(AVFormatContext *s)
        ^
  2543. {
  2544.     int i;

libavformat/utils.c:2580:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `av_close_input_stream` 
  2578.     av_freep(&s->programs);
  2579.     av_freep(&s->priv_data);
  2580.     while(s->nb_chapters--) {
                  ^
  2581. #if FF_API_OLD_METADATA
  2582.         av_free(s->chapters[s->nb_chapters]->title);
