because the interp >= 0UL comparison of an unsigned value is always true fix CID: 1454642
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -168,7 +168,7 @@ static void apply_delogo(uint8_t *dst, int dst_linesize, · 167 unmodified lines | |||
| 168 | botleft[x-logo_x1-1] + | 168 | botleft[x-logo_x1-1] + |
| 169 | botleft[x-logo_x1+1]) * weightb; | 169 | botleft[x-logo_x1+1]) * weightb; |
| 170 | weight = (weightl + weightr + weightt + weightb) * 3U; | 170 | weight = (weightl + weightr + weightt + weightb) * 3U; |
| 171 | interp = ROUNDED_DIV(interp, weight); | 171 | interp = (interp + (weight >> 1)) / weight; |
| 172 | 172 | ||
| 173 | if (y >= logo_y+band && y < logo_y+logo_h-band && | 173 | if (y >= logo_y+band && y < logo_y+logo_h-band && |
| 174 | x >= logo_x+band && x < logo_x+logo_w-band) { | 174 | x >= logo_x+band && x < logo_x+logo_w-band) { |