libavformat/mpegtsenc.c:771: error: Buffer Overrun L2
  Offset added: [5, 371] (⇐ [4, 187] + [1, 184]) Size: 188 by call to `mpegts_write_pes`.

libavformat/mpegtsenc.c:699:5: Assignment
697.     const uint8_t *access_unit_index = NULL;
698.     const uint64_t delay = av_rescale(s->max_delay, 90000, AV_TIME_BASE);
699.     int64_t dts = AV_NOPTS_VALUE, pts = AV_NOPTS_VALUE;
         ^
700. 
701.     if (pkt->pts != AV_NOPTS_VALUE)

libavformat/mpegtsenc.c:768:13: Assignment
766.             ts_st->payload_dts == AV_NOPTS_VALUE) {
767.             ts_st->payload_dts = dts;
768.             ts_st->payload_pts = pts;
                 ^
769.         }
770.         if (ts_st->payload_index >= max_payload_size) {

libavformat/mpegtsenc.c:771:13: Call
769.         }
770.         if (ts_st->payload_index >= max_payload_size) {
771.             mpegts_write_pes(s, st, ts_st->payload, ts_st->payload_index,
                 ^
772.                              ts_st->payload_pts, ts_st->payload_dts);
773.             ts_st->payload_pts = AV_NOPTS_VALUE;

libavformat/mpegtsenc.c:523:1: <Offset trace>
521. 
522. /* NOTE: pes_data contains all the PES packet */
523. static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
     ^
524.                              const uint8_t *payload, int payload_size,
525.                              int64_t pts, int64_t dts)

libavformat/mpegtsenc.c:523:1: Parameter `payload_size`
  521. 
  522. /* NOTE: pes_data contains all the PES packet */
  523. static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
       ^
  524.                              const uint8_t *payload, int payload_size,
  525.                              int64_t pts, int64_t dts)

libavformat/mpegtsenc.c:523:1: <Length trace>
521. 
522. /* NOTE: pes_data contains all the PES packet */
523. static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
     ^
524.                              const uint8_t *payload, int payload_size,
525.                              int64_t pts, int64_t dts)

libavformat/mpegtsenc.c:523:1: Array declaration
  521. 
  522. /* NOTE: pes_data contains all the PES packet */
  523. static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
       ^
  524.                              const uint8_t *payload, int payload_size,
  525.                              int64_t pts, int64_t dts)

libavformat/mpegtsenc.c:680:9: Array access: Offset added: [5, 371] (⇐ [4, 187] + [1, 184]) Size: 188 by call to `mpegts_write_pes` 
  678.             }
  679.         }
  680.         memcpy(buf + TS_PACKET_SIZE - len, payload, len);
               ^
  681.         payload += len;
  682.         payload_size -= len;
