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

libavformat/avidec.c:1570:17: Call
1568.         if (ast) {
1569.             if (ast->sub_ctx) {
1570.                 av_freep(&ast->sub_ctx->pb);
                      ^
1571.                 avformat_close_input(&ast->sub_ctx);
1572.             }

libavutil/mem.c:207:26: Assignment
  205. 
  206.     memcpy(&val, arg, sizeof(val));
  207.     memcpy(arg, &(void *){ NULL }, sizeof(val));
                                ^
  208.     av_free(val);
  209. }

libavformat/avidec.c:1571:17: Call
1569.             if (ast->sub_ctx) {
1570.                 av_freep(&ast->sub_ctx->pb);
1571.                 avformat_close_input(&ast->sub_ctx);
                      ^
1572.             }
1573.             av_free(ast->sub_buffer);

libavformat/utils.c:2486:1: Parameter `(*ps)->nb_chapters`
  2484. }
  2485. 
  2486. void avformat_close_input(AVFormatContext **ps)
        ^
  2487. {
  2488.     AVFormatContext *s = *ps;

libavformat/utils.c:2501:5: Call
  2499.             s->iformat->read_close(s);
  2500. 
  2501.     avformat_free_context(s);
            ^
  2502. 
  2503.     *ps = NULL;

libavformat/utils.c:2432:1: <LHS trace>
2430. }
2431. 
2432. void avformat_free_context(AVFormatContext *s)
      ^
2433. {
2434.     int i, j;

libavformat/utils.c:2432:1: Parameter `s->nb_chapters`
    2430. }
    2431. 
    2432. void avformat_free_context(AVFormatContext *s)
          ^
    2433. {
    2434.     int i, j;

libavformat/utils.c:2475:12: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2473.     av_freep(&s->programs);
    2474.     av_freep(&s->priv_data);
    2475.     while (s->nb_chapters--) {
                     ^
    2476.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2477.         av_free(s->chapters[s->nb_chapters]);
