summaryrefslogtreecommitdiff
path: root/libavcodec/xface.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2017-02-26 11:03:50 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2017-03-24 19:51:36 +0100
commit66c1c9b2774968dc26017269ac175b356592f878 (patch)
treec9fefcd82f2dc5624b7d14e916f29a139aa677ef /libavcodec/xface.c
parentd92ad42fb38a312c86b71b0e17fe860f0c881be4 (diff)
downloadffmpeg-66c1c9b2774968dc26017269ac175b356592f878.tar.gz
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]
Diffstat (limited to 'libavcodec/xface.c')
-rw-r--r--libavcodec/xface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/xface.c b/libavcodec/xface.c
index 8c0cbfdb84..184c174177 100644
--- a/libavcodec/xface.c
+++ b/libavcodec/xface.c
@@ -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];
}
}