libavcodec/mpegvideo_enc.c:1958: error: Buffer Overrun L2
  Offset: [min(1, `s->qscale`), max(31, `s->qscale`)] Size: 13 by call to `ff_mpeg1_encode_mb`.

libavcodec/mpegvideo_enc.c:1631:1: Parameter `s->qscale`
1629. }
1630. 
1631. static av_always_inline void encode_mb_internal(MpegEncContext *s,
      ^
1632.                                                 int motion_x, int motion_y,
1633.                                                 int mb_block_height,

libavcodec/mpegvideo_enc.c:1958:13: Call
1956.     case AV_CODEC_ID_MPEG2VIDEO:
1957.         if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
1958.             ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y);
                  ^
1959.         break;
1960.     case AV_CODEC_ID_MPEG4:

libavcodec/mpeg12enc.c:881:1: Parameter `s->qscale`
  879. }
  880. 
  881. void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[6][64],
       ^
  882.                         int motion_x, int motion_y)
  883. {

libavcodec/mpeg12enc.c:885:9: Call
  883. {
  884.     if (s->chroma_format == CHROMA_420)
  885.         mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);
               ^
  886.     else
  887.         mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);

libavcodec/mpeg12enc.c:603:1: Parameter `s->qscale`
    601. }
    602. 
    603. static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
         ^
    604.                                                       int16_t block[6][64],
    605.                                                       int motion_x, int motion_y,

libavcodec/mpeg12enc.c:653:17: Call
    651.                 /* macroblock_type: macroblock_quant = 1 */
    652.                 put_mb_modes(s, 2, 1, 0, 0);
    653.                 put_qscale(s);
                         ^
    654.             } else {
    655.                 /* macroblock_type: macroblock_quant = 0 */

libavcodec/mpeg12enc.c:325:1: <Offset trace>
323. }
324. 
325. static av_always_inline void put_qscale(MpegEncContext *s)
     ^
326. {
327.     if (s->q_scale_type) {

libavcodec/mpeg12enc.c:325:1: Parameter `s->qscale`
      323. }
      324. 
      325. static av_always_inline void put_qscale(MpegEncContext *s)
           ^
      326. {
      327.     if (s->q_scale_type) {

libavcodec/mpeg12enc.c:39:1: <Length trace>
37. 
38. 
39. static const uint8_t inv_non_linear_qscale[] = {
    ^
40.     0, 2, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16,
41. };

libavcodec/mpeg12enc.c:39:1: Array declaration
      37. 
      38. 
      39. static const uint8_t inv_non_linear_qscale[] = {
          ^
      40.     0, 2, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16,
      41. };

libavcodec/mpeg12enc.c:329:29: Array access: Offset: [min(1, s->qscale), max(31, s->qscale)] Size: 13 by call to `ff_mpeg1_encode_mb` 
      327.     if (s->q_scale_type) {
      328.         assert(s->qscale >= 1 && s->qscale <= 12);
      329.         put_bits(&s->pb, 5, inv_non_linear_qscale[s->qscale]);
                                       ^
      330.     } else {
      331.         put_bits(&s->pb, 5, s->qscale);
