[vlc-commits] transform: fix off-by-one (fixes #10505)

Rémi Denis-Courmont git at videolan.org
Tue Jan 28 17:25:11 CET 2014


vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 28 18:23:56 2014 +0200| [cebfcfdbd1f447994994f0d64ddf1721b4bb65d8] | committer: Rémi Denis-Courmont

transform: fix off-by-one (fixes #10505)

(cherry picked from commit 4e0920ce35fe50c437fdc0a31f3b46a1dfa13016)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=cebfcfdbd1f447994994f0d64ddf1721b4bb65d8
---

 modules/video_filter/transform.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_filter/transform.c b/modules/video_filter/transform.c
index 68d4fd5..02ec78e 100644
--- a/modules/video_filter/transform.c
+++ b/modules/video_filter/transform.c
@@ -102,8 +102,8 @@ static void R90(int *sx, int *sy, int w, int h, int dx, int dy)
 }
 static void R180(int *sx, int *sy, int w, int h, int dx, int dy)
 {
-    *sx = w - dx;
-    *sy = h - dy;
+    *sx = w - 1 - dx;
+    *sy = h - 1 - dy;
 }
 static void R270(int *sx, int *sy, int w, int h, int dx, int dy)
 {



More information about the vlc-commits mailing list