libavcodec/hevc_ps.c:151: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32.

libavcodec/hevc_ps.c:79:5: <LHS trace>
77.     uint8_t rps_predict = 0;
78.     int delta_poc;
79.     int k0 = 0;
        ^
80.     int k1 = 0;
81.     int k  = 0;

libavcodec/hevc_ps.c:79:5: Assignment
77.     uint8_t rps_predict = 0;
78.     int delta_poc;
79.     int k0 = 0;
        ^
80.     int k1 = 0;
81.     int k  = 0;

libavcodec/hevc_ps.c:131:9: Assignment
129. 
130.         rps->num_delta_pocs    = k;
131.         rps->num_negative_pics = k0;
             ^
132.         // sort in increasing order (smallest first)
133.         if (rps->num_delta_pocs != 0) {

libavcodec/hevc_ps.c:151:13: Binary operation: ([0, +oo] - 1):unsigned32
149.         if ((rps->num_negative_pics >> 1) != 0) {
150.             int used;
151.             k = rps->num_negative_pics - 1;
                 ^
152.             // flip the negative values to largest first
153.             for (i = 0; i < rps->num_negative_pics >> 1; i++) {
