libavcodec/mpegvideo_enc.c:1761: 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:1505:1: Parameter `s->qscale`
1503. }
1504. 
1505. static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count)
      ^
1506. {
1507.     int16_t weight[8][64];

libavcodec/mpegvideo_enc.c:1761:13: Call
1759.     case CODEC_ID_MPEG2VIDEO:
1760.         if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
1761.             mpeg1_encode_mb(s, s->block, motion_x, motion_y);
                  ^
1762.         break;
1763.     case CODEC_ID_MPEG4:

libavcodec/mpeg12enc.c:674:1: Parameter `s->qscale`
  672. }
  673. 
  674. void mpeg1_encode_mb(MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
       ^
  675. {
  676.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);

libavcodec/mpeg12enc.c:677:41: Call
  675. {
  676.     if (s->chroma_format == CHROMA_420) mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 6);
  677.     else                                mpeg1_encode_mb_internal(s, block, motion_x, motion_y, 8);
                                               ^
  678. }
  679. 

libavcodec/mpeg12enc.c:449:1: Parameter `s->qscale`
    447. }
    448. 
    449. static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
         ^
    450.                                                    DCTELEM block[6][64],
    451.                                                    int motion_x, int motion_y,

libavcodec/mpeg12enc.c:491:17: Call
    489.             if(s->dquant && cbp){
    490.                 put_mb_modes(s, 2, 1, 0, 0); /* macroblock_type : macroblock_quant = 1 */
    491.                 put_qscale(s);
                         ^
    492.             }else{
    493.                 put_mb_modes(s, 1, 1, 0, 0); /* macroblock_type : macroblock_quant = 0 */

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

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

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

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

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