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

libavcodec/mpegvideo_enc.c:1721:1: Parameter `s->qscale`
1719. }
1720. 
1721. static av_always_inline void encode_mb_internal(MpegEncContext *s,
      ^
1722.                                                 int motion_x, int motion_y,
1723.                                                 int mb_block_height,

libavcodec/mpegvideo_enc.c:2046:13: Call
2044.     case CODEC_ID_MPEG2VIDEO:
2045.         if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
2046.             mpeg1_encode_mb(s, s->block, motion_x, motion_y);
                  ^
2047.         break;
2048.     case CODEC_ID_MPEG4:

libavcodec/mpeg12enc.c:666:1: Parameter `s->qscale`
  664. }
  665. 
  666. void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
       ^
  667. {
  668.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);

libavcodec/mpeg12enc.c:669:41: Call
  667. {
  668.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);
  669.     else                                mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);
                                               ^
  670. }
  671. 

libavcodec/mpeg12enc.c:441:1: Parameter `s->qscale`
    439. }
    440. 
    441. static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
         ^
    442.                                                    DCTELEM block[6][64],
    443.                                                    int motion_x, int motion_y,

libavcodec/mpeg12enc.c:483:17: Call
    481.             if(s->dquant && cbp){
    482.                 put_mb_modes(s, 2, 1, 0, 0); /* macroblock_type : macroblock_quant = 1 */
    483.                 put_qscale(s);
                         ^
    484.             }else{
    485.                 put_mb_modes(s, 1, 1, 0, 0); /* macroblock_type : macroblock_quant = 0 */

libavcodec/mpeg12enc.c:320:1: <Offset trace>
318. }
319. 
320. static av_always_inline void put_qscale(MpegEncContext *s)
     ^
321. {
322.     if(s->q_scale_type){

libavcodec/mpeg12enc.c:320:1: Parameter `s->qscale`
      318. }
      319. 
      320. static av_always_inline void put_qscale(MpegEncContext *s)
           ^
      321. {
      322.     if(s->q_scale_type){

libavcodec/mpeg12enc.c:40:1: <Length trace>
38. #include "libavutil/opt.h"
39. 
40. static const uint8_t inv_non_linear_qscale[13] = {
    ^
41.     0, 2, 4, 6, 8,
42.     9,10,11,12,13,14,15,16,

libavcodec/mpeg12enc.c:40:1: Array declaration
      38. #include "libavutil/opt.h"
      39. 
      40. static const uint8_t inv_non_linear_qscale[13] = {
          ^
      41.     0, 2, 4, 6, 8,
      42.     9,10,11,12,13,14,15,16,

libavcodec/mpeg12enc.c:324:29: Array access: Offset: [min(1, s->qscale), max(31, s->qscale)] Size: 13 by call to `mpeg1_encode_mb` 
      322.     if(s->q_scale_type){
      323.         assert(s->qscale>=1 && s->qscale <=12);
      324.         put_bits(&s->pb, 5, inv_non_linear_qscale[s->qscale]);
                                       ^
      325.     }else{
      326.         put_bits(&s->pb, 5, s->qscale);
