[libbluray-devel] StreamControl: fix languageFromInteger()
hpi1
git at videolan.org
Sun Oct 19 20:42:08 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Oct 19 21:39:54 2014 +0300| [248aa547f4809556bbc43068d8a2c800b5c532e7] | committer: hpi1
StreamControl: fix languageFromInteger()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=248aa547f4809556bbc43068d8a2c800b5c532e7
---
.../java/org/videolan/media/content/playlist/StreamControl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/StreamControl.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/StreamControl.java
index 6b15a1d..be0cd06 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/StreamControl.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/StreamControl.java
@@ -51,9 +51,9 @@ public abstract class StreamControl implements Control {
protected String languageFromInteger(int value) {
char[] language = new char[3];
- language[0] = (char)(value >> 16);
- language[1] = (char)(value >> 8);
- language[2] = (char)value;
+ language[0] = (char)((value >> 16) & 0xff);
+ language[1] = (char)((value >> 8) & 0xff);
+ language[2] = (char)(value & 0xff);
return String.valueOf(language);
}
More information about the libbluray-devel
mailing list