[libbluray-devel] Fix division (should use float instead of int)

hpi1 git at videolan.org
Mon Sep 8 11:42:48 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Sep  8 11:27:17 2014 +0300| [4f7d3641b63ea0734c5bf5d6cc0fac3e135924d2] | committer: hpi1

Fix division (should use float instead of int)

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

 .../media/content/video/dvb/mpeg/drip/VideoControl.java        |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java b/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
index 939f2c8..248ff0c 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/video/dvb/mpeg/drip/VideoControl.java
@@ -36,10 +36,10 @@ public class VideoControl implements VideoPresentationControl {
     protected HScreenRectangle getNormalizedRectangle(Dimension dimension, Rectangle rectangle) {
         if ((dimension.width == 0) || (dimension.height == 0))
             return new HScreenRectangle(0, 0, 0, 0);
-        float x = rectangle.x / dimension.width;
-        float y = rectangle.y / dimension.height;
-        float w = rectangle.width / dimension.width;
-        float h = rectangle.height / dimension.height;
+        float x = (float)rectangle.x / dimension.width;
+        float y = (float)rectangle.y / dimension.height;
+        float w = (float)rectangle.width / dimension.width;
+        float h = (float)rectangle.height / dimension.height;
         return new HScreenRectangle(x, y, w, h);
     }
 



More information about the libbluray-devel mailing list