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

libavformat/avidec.c:1368:17: Call
1366.         if (ast) {
1367.             if (ast->sub_ctx) {
1368.                 av_freep(&ast->sub_ctx->pb);
                      ^
1369.                 avformat_close_input(&ast->sub_ctx);
1370.             }

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

libavformat/avidec.c:1369:17: Call
1367.             if (ast->sub_ctx) {
1368.                 av_freep(&ast->sub_ctx->pb);
1369.                 avformat_close_input(&ast->sub_ctx);
                      ^
1370.             }
1371.             av_free(ast->sub_buffer);

libavformat/utils.c:2702:1: Parameter `(*ps)->nb_chapters`
  2700. #endif
  2701. 
  2702. void avformat_close_input(AVFormatContext **ps)
        ^
  2703. {
  2704.     AVFormatContext *s = *ps;

libavformat/utils.c:2718:5: Call
  2716.     }
  2717. 
  2718.     avformat_free_context(s);
            ^
  2719. 
  2720.     *ps = NULL;

libavformat/utils.c:2652:1: <LHS trace>
2650. }
2651. 
2652. void avformat_free_context(AVFormatContext *s)
      ^
2653. {
2654.     int i;

libavformat/utils.c:2652:1: Parameter `s->nb_chapters`
    2650. }
    2651. 
    2652. void avformat_free_context(AVFormatContext *s)
          ^
    2653. {
    2654.     int i;

libavformat/utils.c:2685:11: Binary operation: ([-oo, 0] - 1):unsigned32 by call to `avformat_close_input` 
    2683.     av_freep(&s->programs);
    2684.     av_freep(&s->priv_data);
    2685.     while(s->nb_chapters--) {
                    ^
    2686.         av_dict_free(&s->chapters[s->nb_chapters]->metadata);
    2687.         av_free(s->chapters[s->nb_chapters]);
