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

libavformat/avidec.c:1298:13: Call
1296.         av_free(st->codec->palctrl);
1297.         if (ast->sub_ctx) {
1298.             av_freep(ast->sub_ctx->pb);
                  ^
1299.             av_close_input_stream(ast->sub_ctx);
1300.         }

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

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

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

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

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