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

libavformat/avidec.c:1498:17: Call
1496.         if (ast) {
1497.             if (ast->sub_ctx) {
1498.                 av_freep(&ast->sub_ctx->pb);
                      ^
1499.                 avformat_close_input(&ast->sub_ctx);
1500.             }

libavutil/mem.c:202:5: Assignment
  200.     void **ptr = (void **)arg;
  201.     av_free(*ptr);
  202.     *ptr = NULL;
           ^
  203. }
  204. 

libavformat/avidec.c:1499:17: Call
1497.             if (ast->sub_ctx) {
1498.                 av_freep(&ast->sub_ctx->pb);
1499.                 avformat_close_input(&ast->sub_ctx);
                      ^
1500.             }
1501.             av_free(ast->sub_buffer);

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

libavformat/utils.c:2662:5: Call
  2660.             s->iformat->read_close(s);
  2661. 
  2662.     avformat_free_context(s);
            ^
  2663. 
  2664.     *ps = NULL;

libavformat/utils.c:2596:1: <LHS trace>
2594. }
2595. 
2596. void avformat_free_context(AVFormatContext *s)
      ^
2597. {
2598.     int i, j;

libavformat/utils.c:2596:1: Parameter `s->nb_chapters`
    2594. }
    2595. 
    2596. void avformat_free_context(AVFormatContext *s)
          ^
    2597. {
    2598.     int i, j;

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