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

libavformat/avidec.c:1373:17: Call
1371.         if (ast) {
1372.             if (ast->sub_ctx) {
1373.                 av_freep(&ast->sub_ctx->pb);
                      ^
1374.                 avformat_close_input(&ast->sub_ctx);
1375.             }

libavutil/mem.c:158:5: Assignment
  156.     void **ptr = (void **)arg;
  157.     av_free(*ptr);
  158.     *ptr = NULL;
           ^
  159. }
  160. 

libavformat/avidec.c:1374:17: Call
1372.             if (ast->sub_ctx) {
1373.                 av_freep(&ast->sub_ctx->pb);
1374.                 avformat_close_input(&ast->sub_ctx);
                      ^
1375.             }
1376.             av_free(ast->sub_buffer);

libavformat/utils.c:2673:1: Parameter `(*ps)->nb_chapters`
  2671. #endif
  2672. 
  2673. void avformat_close_input(AVFormatContext **ps)
        ^
  2674. {
  2675.     AVFormatContext *s = *ps;

libavformat/utils.c:2689:5: Call
  2687.     }
  2688. 
  2689.     avformat_free_context(s);
            ^
  2690. 
  2691.     *ps = NULL;

libavformat/utils.c:2623:1: <LHS trace>
2621. }
2622. 
2623. void avformat_free_context(AVFormatContext *s)
      ^
2624. {
2625.     int i;

libavformat/utils.c:2623:1: Parameter `s->nb_chapters`
    2621. }
    2622. 
    2623. void avformat_free_context(AVFormatContext *s)
          ^
    2624. {
    2625.     int i;

libavformat/utils.c:2656:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2654.     av_freep(&s->programs);
    2655.     av_freep(&s->priv_data);
    2656.     while(s->nb_chapters--) {
                    ^
    2657.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2658.         av_free(s->chapters[s->nb_chapters]);
