libavformat/rtpenc_mpegts.c:41: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `avformat_free_context`.

libavformat/rtpenc_mpegts.c:38:13: Call
36.         if (chain->mpegts_ctx->pb) {
37.             uint8_t *buf;
38.             avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
                ^
39.             av_free(buf);
40.         }

libavformat/aviobuf.c:966:1: Parameter `*s->write_packet`
  964. }
  965. 
  966. int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
       ^
  967. {
  968.     DynBuffer *d;

libavformat/rtpenc_mpegts.c:41:9: Call
39.             av_free(buf);
40.         }
41.         avformat_free_context(chain->mpegts_ctx);
            ^
42.     }
43.     if (chain->rtp_ctx) {

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_programs`
  2430. }
  2431. 
  2432. void avformat_free_context(AVFormatContext *s)
        ^
  2433. {
  2434.     int i, j;

libavformat/utils.c:2468:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_free_context` 
  2466.         av_free(st);
  2467.     }
  2468.     for (i = s->nb_programs - 1; i >= 0; i--) {
                 ^
  2469.         av_dict_free(&s->programs[i]->metadata);
  2470.         av_freep(&s->programs[i]->stream_index);
