libavcodec/ffv1.c:508: error: Buffer Overrun L3
  Offset: 2 Size: [2, 3] by call to `encode_line`.

libavcodec/ffv1.c:491:26: Assignment
489. static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){
490.     int x,y,i;
491.     const int ring_size= s->avctx->context_model ? 3 : 2;
                              ^
492.     int_fast16_t sample_buffer[ring_size][w+6], *sample[ring_size];
493.     s->run_index=0;

libavcodec/ffv1.c:491:5: Assignment
489. static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){
490.     int x,y,i;
491.     const int ring_size= s->avctx->context_model ? 3 : 2;
         ^
492.     int_fast16_t sample_buffer[ring_size][w+6], *sample[ring_size];
493.     s->run_index=0;

libavcodec/ffv1.c:492:57: Array declaration
490.     int x,y,i;
491.     const int ring_size= s->avctx->context_model ? 3 : 2;
492.     int_fast16_t sample_buffer[ring_size][w+6], *sample[ring_size];
                                                             ^
493.     s->run_index=0;
494. 

libavcodec/ffv1.c:508:13: Call
506.                 sample[0][x]= src[x + stride*y];
507.             }
508.             encode_line(s, w, sample, plane_index, 8);
                 ^
509.         }else{
510.             for(x=0; x<w; x++){

libavcodec/ffv1.c:411:1: <Length trace>
409. 
410. #if CONFIG_FFV1_ENCODER
411. static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
     ^
412.     PlaneContext * const p= &s->plane[plane_index];
413.     RangeCoder * const c= &s->c;

libavcodec/ffv1.c:411:1: Parameter `*sample`
  409. 
  410. #if CONFIG_FFV1_ENCODER
  411. static inline int encode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
       ^
  412.     PlaneContext * const p= &s->plane[plane_index];
  413.     RangeCoder * const c= &s->c;

libavcodec/ffv1.c:434:59: Array access: Offset: 2 Size: [2, 3] by call to `encode_line` 
  432.         int diff, context;
  433. 
  434.         context= get_context(s, sample[0]+x, sample[1]+x, sample[2]+x);
                                                                 ^
  435.         diff= sample[0][x] - predict(sample[0]+x, sample[1]+x);
  436. 
