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

libavformat/rtpenc_mpegts.c:37:9: Call
35.     if (chain->mpegts_ctx) {
36.         av_write_trailer(chain->mpegts_ctx);
37.         ffio_free_dyn_buf(&chain->mpegts_ctx->pb);
            ^
38.         avformat_free_context(chain->mpegts_ctx);
39.     }

libavformat/aviobuf.c:1193:1: Parameter `(*s)->written`
  1191. }
  1192. 
  1193. void ffio_free_dyn_buf(AVIOContext **s)
        ^
  1194. {
  1195.     uint8_t *tmp;

libavformat/rtpenc_mpegts.c:38:9: Call
36.         av_write_trailer(chain->mpegts_ctx);
37.         ffio_free_dyn_buf(&chain->mpegts_ctx->pb);
38.         avformat_free_context(chain->mpegts_ctx);
            ^
39.     }
40.     if (chain->rtp_ctx) {

libavformat/utils.c:2705:1: <LHS trace>
2703. }
2704. 
2705. void avformat_free_context(AVFormatContext *s)
      ^
2706. {
2707.     int i;

libavformat/utils.c:2705:1: Parameter `s->nb_programs`
  2703. }
  2704. 
  2705. void avformat_free_context(AVFormatContext *s)
        ^
  2706. {
  2707.     int i;

libavformat/utils.c:2719:10: Binary operation: ([0, +oo] - 1):unsigned32 by call to `avformat_free_context` 
  2717.         free_stream(&s->streams[i]);
  2718. 
  2719.     for (i = s->nb_programs - 1; i >= 0; i--) {
                 ^
  2720.         av_dict_free(&s->programs[i]->metadata);
  2721.         av_freep(&s->programs[i]->stream_index);
