Commit 66c1c9b2 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavc/xface: Reorder conditions to silence a gcc warning.

libavcodec/xface.c:318:27: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
parent d92ad42f
......@@ -315,9 +315,9 @@ void ff_xface_generate_face(uint8_t *dst, uint8_t * const src)
for (l = i - 2; l <= i + 2; l++) {
for (m = j - 2; m <= j; m++) {
if (l >= i && m == j)
if (l <= 0 || l >= i && m == j)
continue;
if (l > 0 && l <= XFACE_WIDTH && m > 0)
if (l <= XFACE_WIDTH && m > 0)
k = 2*k + src[l + m * XFACE_WIDTH];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment