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:2639:1: Parameter `(*ps)->nb_chapters`
  2637. }
  2638. 
  2639. void avformat_close_input(AVFormatContext **ps)
        ^
  2640. {
  2641.     AVFormatContext *s = *ps;

libavformat/utils.c:2654:5: Call
  2652.             s->iformat->read_close(s);
  2653. 
  2654.     avformat_free_context(s);
            ^
  2655. 
  2656.     *ps = NULL;

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

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

libavformat/utils.c:2629:12: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2627.     av_freep(&s->programs);
    2628.     av_freep(&s->priv_data);
    2629.     while (s->nb_chapters--) {
                     ^
    2630.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2631.         av_free(s->chapters[s->nb_chapters]);
