libavcodec/g722enc.c:207: error: Buffer Overrun L2
  Offset: [1+min(22, `c->prev_samples_pos`), 1+max(1023, `c->prev_samples_pos`)] Size: 1024 by call to `filter_samples`.

libavcodec/g722enc.c:176:1: Parameter `c->prev_samples_pos`
174. }
175. 
176. static void g722_encode_trellis(G722Context *c, int trellis,
     ^
177.                                 uint8_t *dst, int nb_samples,
178.                                 const int16_t *samples)

libavcodec/g722enc.c:207:9: Call
205.         }
206. 
207.         filter_samples(c, &samples[2*i], &xlow, &xhigh);
             ^
208. 
209.         for (j = 0; j < frontier && nodes[0][j]; j++) {

libavcodec/g722enc.c:137:1: <Offset trace>
135. };
136. 
137. static inline void filter_samples(G722Context *c, const int16_t *samples,
     ^
138.                                   int *xlow, int *xhigh)
139. {

libavcodec/g722enc.c:137:1: Parameter `c->prev_samples_pos`
  135. };
  136. 
  137. static inline void filter_samples(G722Context *c, const int16_t *samples,
       ^
  138.                                   int *xlow, int *xhigh)
  139. {

libavcodec/g722enc.c:141:21: Assignment
  139. {
  140.     int xout[2];
  141.     c->prev_samples[c->prev_samples_pos++] = samples[0];
                           ^
  142.     c->prev_samples[c->prev_samples_pos++] = samples[1];
  143.     c->dsp.apply_qmf(c->prev_samples + c->prev_samples_pos - 24, xout);

libavcodec/g722enc.c:137:1: <Length trace>
135. };
136. 
137. static inline void filter_samples(G722Context *c, const int16_t *samples,
     ^
138.                                   int *xlow, int *xhigh)
139. {

libavcodec/g722enc.c:137:1: Parameter `c->prev_samples[*]`
  135. };
  136. 
  137. static inline void filter_samples(G722Context *c, const int16_t *samples,
       ^
  138.                                   int *xlow, int *xhigh)
  139. {

libavcodec/g722enc.c:142:5: Array access: Offset: [1+min(22, c->prev_samples_pos), 1+max(1023, c->prev_samples_pos)] Size: 1024 by call to `filter_samples` 
  140.     int xout[2];
  141.     c->prev_samples[c->prev_samples_pos++] = samples[0];
  142.     c->prev_samples[c->prev_samples_pos++] = samples[1];
           ^
  143.     c->dsp.apply_qmf(c->prev_samples + c->prev_samples_pos - 24, xout);
  144.     *xlow  = xout[0] + xout[1] >> 14;
