libavcodec/mpegvideo_enc.c:2053: 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:1726:1: Parameter `s->qscale`
1724. }
1725. 
1726. static av_always_inline void encode_mb_internal(MpegEncContext *s,
      ^
1727.                                                 int motion_x, int motion_y,
1728.                                                 int mb_block_height,

libavcodec/mpegvideo_enc.c:2053:13: Call
2051.     case AV_CODEC_ID_MPEG2VIDEO:
2052.         if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
2053.             ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y);
                  ^
2054.         break;
2055.     case AV_CODEC_ID_MPEG4:

libavcodec/mpeg12enc.c:659:1: Parameter `s->qscale`
  657. }
  658. 
  659. void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
       ^
  660. {
  661.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);

libavcodec/mpeg12enc.c:662:41: Call
  660. {
  661.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);
  662.     else                                mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);
                                               ^
  663. }
  664. 

libavcodec/mpeg12enc.c:434:1: Parameter `s->qscale`
    432. }
    433. 
    434. static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
         ^
    435.                                                    int16_t block[6][64],
    436.                                                    int motion_x, int motion_y,

libavcodec/mpeg12enc.c:476:17: Call
    474.             if(s->dquant && cbp){
    475.                 put_mb_modes(s, 2, 1, 0, 0); /* macroblock_type : macroblock_quant = 1 */
    476.                 put_qscale(s);
                         ^
    477.             }else{
    478.                 put_mb_modes(s, 1, 1, 0, 0); /* macroblock_type : macroblock_quant = 0 */

libavcodec/mpeg12enc.c:313:1: <Offset trace>
311. }
312. 
313. static av_always_inline void put_qscale(MpegEncContext *s)
     ^
314. {
315.     if(s->q_scale_type){

libavcodec/mpeg12enc.c:313:1: Parameter `s->qscale`
      311. }
      312. 
      313. static av_always_inline void put_qscale(MpegEncContext *s)
           ^
      314. {
      315.     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:317:29: Array access: Offset: [min(1, s->qscale), max(31, s->qscale)] Size: 13 by call to `ff_mpeg1_encode_mb` 
      315.     if(s->q_scale_type){
      316.         assert(s->qscale>=1 && s->qscale <=12);
      317.         put_bits(&s->pb, 5, inv_non_linear_qscale[s->qscale]);
                                       ^
      318.     }else{
      319.         put_bits(&s->pb, 5, s->qscale);
