libavcodec/h264_slice.c:1538: error: Buffer Overrun L2
  Offset: [-1+min(1, `h->picture_structure`), -1+max(3, `h->picture_structure`)] Size: 2 by call to `implicit_weight_table`.

libavcodec/h264_slice.c:1039:1: Parameter `h->picture_structure`
1037.  * @return 0 if okay, <0 if an error occurred, 1 if decoding must not be multithreaded
1038.  */
1039. int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
      ^
1040. {
1041.     unsigned int first_mb_in_slice;

libavcodec/h264_slice.c:1493:11: Call
1491.         sl->redundant_pic_count = get_ue_golomb(&sl->gb);
1492. 
1493.     ret = ff_set_ref_count(h, sl);
                ^
1494.     if (ret < 0)
1495.         return ret;

libavcodec/h264.c:1198:1: Parameter `h->picture_structure`
  1196. }
  1197. 
  1198. int ff_set_ref_count(H264Context *h, H264SliceContext *sl)
        ^
  1199. {
  1200.     int ref_count[2], list_count;

libavcodec/h264_slice.c:1537:13: Call
1535. 
1536.         if (h->pps.weighted_bipred_idc == 2 && sl->slice_type_nos == AV_PICTURE_TYPE_B) {
1537.             implicit_weight_table(h, sl, 0);
                  ^
1538.             implicit_weight_table(h, sl, 1);
1539.         }

libavcodec/h264_slice.c:724:1: Parameter `h->picture_structure`
  722.  *                -1 initializes the rest
  723.  */
  724. static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, int field)
       ^
  725. {
  726.     int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;

libavcodec/h264_slice.c:1538:13: Call
1536.         if (h->pps.weighted_bipred_idc == 2 && sl->slice_type_nos == AV_PICTURE_TYPE_B) {
1537.             implicit_weight_table(h, sl, 0);
1538.             implicit_weight_table(h, sl, 1);
                  ^
1539.         }
1540.     }

libavcodec/h264_slice.c:724:1: <Offset trace>
722.  *                -1 initializes the rest
723.  */
724. static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, int field)
     ^
725. {
726.     int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;

libavcodec/h264_slice.c:724:1: Parameter `h->picture_structure`
  722.  *                -1 initializes the rest
  723.  */
  724. static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, int field)
       ^
  725. {
  726.     int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;

libavcodec/h264_slice.c:724:1: <Length trace>
722.  *                -1 initializes the rest
723.  */
724. static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, int field)
     ^
725. {
726.     int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;

libavcodec/h264_slice.c:724:1: Parameter `h->cur_pic_ptr->field_poc[*]`
  722.  *                -1 initializes the rest
  723.  */
  724. static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, int field)
       ^
  725. {
  726.     int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1;

libavcodec/h264_slice.c:737:23: Array access: Offset: [-1+min(1, h->picture_structure), -1+max(3, h->picture_structure)] Size: 2 by call to `implicit_weight_table` 
  735.             cur_poc = h->cur_pic_ptr->poc;
  736.         } else {
  737.             cur_poc = h->cur_pic_ptr->field_poc[h->picture_structure - 1];
                             ^
  738.         }
  739.         if (sl->ref_count[0] == 1 && sl->ref_count[1] == 1 && !FRAME_MBAFF(h) &&
