[libbluray-devel] Fix signed / unsigned mismatch in BDImageConsumer

tourettes git at videolan.org
Thu Apr 11 18:03:11 CEST 2013


libbluray | branch: master | tourettes <tourettes at team-mediaportal.com> | Tue Apr  9 21:33:16 2013 +0300| [395be9d5f09c4d413d9a11053902a619818ed48d] | committer: hpi1

Fix signed / unsigned mismatch in BDImageConsumer

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=395be9d5f09c4d413d9a11053902a619818ed48d
---

 src/libbluray/bdj/java/java/awt/BDImageConsumer.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDImageConsumer.java b/src/libbluray/bdj/java/java/awt/BDImageConsumer.java
index 0aa5e67..6091535 100644
--- a/src/libbluray/bdj/java/java/awt/BDImageConsumer.java
+++ b/src/libbluray/bdj/java/java/awt/BDImageConsumer.java
@@ -158,7 +158,7 @@ public class BDImageConsumer extends BDImage implements ImageConsumer {
         int X, Y;
         for (Y = y; Y < (y + h); Y++)
             for (X = x; X < (x + w); X++)
-                backBuffer[Y * width + X] = cm.getRGB(pixels[offset + (Y - y) * scansize + (X - x)]);
+                backBuffer[Y * width + X] = cm.getRGB(pixels[offset + (Y - y) * scansize + (X - x)] & 0xFF);
         status |= ImageObserver.SOMEBITS;
         notifyObservers(this, ImageObserver.SOMEBITS, x, y, w, h);
     }



More information about the libbluray-devel mailing list