Hello community,

here is the log from the commit of package libbluray for openSUSE:Factory 
checked in at 2015-12-09 19:33:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libbluray (Old)
 and      /work/SRC/openSUSE:Factory/.libbluray.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libbluray"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libbluray/libbluray.changes      2015-11-08 
11:25:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libbluray.new/libbluray.changes 2015-12-09 
19:33:06.000000000 +0100
@@ -1,0 +2,16 @@
+Thu Dec 03 12:56:17 UTC 2015 - [email protected]
+
+- Update to version 0.9.2:
+  + Add primary audio stream to bd_select_stream().
+  + Improve error resilience.
+  + Fix Java 8 compability issues.
+  + Fix Android build.
+  + Fix SecurityException in AWTAutoShutdown.
+  + Fix BD-J check when install path in Windows contains
+    non-ASCII chars.
+  + Fix jvm.dll loading in Windows ($JAVA_HOME/bin should be in
+    dll load path).
+  + Fix class translating in recent Java 8 versions.
+- Fixed patches libbluray-autotools.patch and libbluray-jvm_dir.patch.
+
+-------------------------------------------------------------------

Old:
----
  libbluray-0.9.1.tar.bz2

New:
----
  libbluray-0.9.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libbluray.spec ++++++
--- /var/tmp/diff_new_pack.OM7KPM/_old  2015-12-09 19:33:07.000000000 +0100
+++ /var/tmp/diff_new_pack.OM7KPM/_new  2015-12-09 19:33:07.000000000 +0100
@@ -19,7 +19,7 @@
 
 %define         soname 1
 Name:           libbluray
-Version:        0.9.1
+Version:        0.9.2
 Release:        0
 Summary:        Library to access Blu-Ray disk
 License:        LGPL-2.1+

++++++ libbluray-0.9.1.tar.bz2 -> libbluray-0.9.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/ChangeLog 
new/libbluray-0.9.2/ChangeLog
--- old/libbluray-0.9.1/ChangeLog       2015-11-03 22:01:43.000000000 +0100
+++ new/libbluray-0.9.2/ChangeLog       2015-12-01 13:22:18.000000000 +0100
@@ -1,3 +1,13 @@
+2015-12-01: Version 0.9.2
+- Add primary audio stream to bd_select_stream().
+- Improve error resilience.
+- Fix Java 8 compability issues.
+- Fix Android build.
+- Fix SecurityException in AWTAutoShutdown.
+- Fix BD-J check when install path in Windows contains non-ASCII chars.
+- Fix jvm.dll loading in Windows ($JAVA_HOME/bin should be in dll load path).
+- Fix class translating in recent Java 8 versions.
+
 2015-11-03: Version 0.9.1
 - Improved BD-J security.
 - Improved error resilience.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/Makefile.am 
new/libbluray-0.9.2/Makefile.am
--- old/libbluray-0.9.1/Makefile.am     2015-11-03 22:01:43.000000000 +0100
+++ new/libbluray-0.9.2/Makefile.am     2015-11-25 09:00:27.000000000 +0100
@@ -150,7 +150,7 @@
 endif
 endif
 
-libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) -export-symbols-regex 
"^bd_"
+libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) 
-export-symbols-regex "^bd_"
 libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS)
 
 noinst_HEADERS = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/Makefile.in 
new/libbluray-0.9.2/Makefile.in
--- old/libbluray-0.9.1/Makefile.in     2015-11-03 22:01:56.000000000 +0100
+++ new/libbluray-0.9.2/Makefile.in     2015-12-01 13:31:40.000000000 +0100
@@ -851,7 +851,7 @@
        src/util/strutl.h src/util/strutl.c src/util/time.h \
        src/util/time.c $(am__append_1) $(am__append_2) \
        $(am__append_3) $(am__append_4) $(am__append_5)
-libbluray_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -export-symbols-regex 
"^bd_"
+libbluray_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION_INFO) 
-export-symbols-regex "^bd_"
 libbluray_la_LIBADD = $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS)
 noinst_HEADERS = \
        jni/jni.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/bootstrap 
new/libbluray-0.9.2/bootstrap
--- old/libbluray-0.9.1/bootstrap       2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/bootstrap       2015-11-12 19:29:19.000000000 +0100
@@ -1,3 +1,7 @@
 #!/bin/sh
 
+set -e
+
+cd "$(dirname "$0")"
+
 autoreconf -vif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/configure 
new/libbluray-0.9.2/configure
--- old/libbluray-0.9.1/configure       2015-11-03 22:01:55.000000000 +0100
+++ new/libbluray-0.9.2/configure       2015-12-01 13:31:39.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libbluray 0.9.1.
+# Generated by GNU Autoconf 2.69 for libbluray 0.9.2.
 #
 # Report bugs to <http://www.videolan.org/developers/libbluray.html>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libbluray'
 PACKAGE_TARNAME='libbluray'
-PACKAGE_VERSION='0.9.1'
-PACKAGE_STRING='libbluray 0.9.1'
+PACKAGE_VERSION='0.9.2'
+PACKAGE_STRING='libbluray 0.9.2'
 PACKAGE_BUGREPORT='http://www.videolan.org/developers/libbluray.html'
 PACKAGE_URL=''
 
@@ -1418,7 +1418,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libbluray 0.9.1 to adapt to many kinds of systems.
+\`configure' configures libbluray 0.9.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1488,7 +1488,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libbluray 0.9.1:";;
+     short | recursive ) echo "Configuration of libbluray 0.9.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1640,7 +1640,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libbluray configure 0.9.1
+libbluray configure 0.9.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2066,7 +2066,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libbluray $as_me 0.9.1, which was
+It was created by libbluray $as_me 0.9.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3001,7 +3001,7 @@
 
 # Define the identity of the package.
  PACKAGE='libbluray'
- VERSION='0.9.1'
+ VERSION='0.9.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15351,10 +15351,10 @@
 
 BLURAY_VERSION_MINOR=9
 
-BLURAY_VERSION_MICRO=1
+BLURAY_VERSION_MICRO=2
 
 
-LT_VERSION_INFO="10:1:9"
+LT_VERSION_INFO="10:2:9"
 
 
 
@@ -15998,7 +15998,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libbluray $as_me 0.9.1, which was
+This file was extended by libbluray $as_me 0.9.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16064,7 +16064,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libbluray config.status 0.9.1
+libbluray config.status 0.9.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/configure.ac 
new/libbluray-0.9.2/configure.ac
--- old/libbluray-0.9.1/configure.ac    2015-11-03 22:01:43.000000000 +0100
+++ new/libbluray-0.9.2/configure.ac    2015-12-01 13:22:18.000000000 +0100
@@ -1,7 +1,7 @@
 dnl library version number
 m4_define([bluray_major], 0)
 m4_define([bluray_minor], 9)
-m4_define([bluray_micro], 1)
+m4_define([bluray_micro], 2)
 m4_define([bluray_version],[bluray_major.bluray_minor.bluray_micro])
 
 dnl shared library version (.so version)
@@ -13,7 +13,7 @@
 dnl Library file name will be libbluray.so.(current-age).age.revision
 dnl
 m4_define([lt_current],  10)
-m4_define([lt_revision], 1)
+m4_define([lt_revision], 2)
 m4_define([lt_age],      9)
 
 dnl initilization
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/contrib/libudfread/src/default_blockinput.c 
new/libbluray-0.9.2/contrib/libudfread/src/default_blockinput.c
--- old/libbluray-0.9.1/contrib/libudfread/src/default_blockinput.c     
2015-04-06 18:44:35.000000000 +0200
+++ new/libbluray-0.9.2/contrib/libudfread/src/default_blockinput.c     
2015-11-26 11:12:40.000000000 +0100
@@ -41,6 +41,12 @@
 #include <io.h>
 #endif
 
+#ifdef __ANDROID__
+# undef  lseek
+# define lseek lseek64
+# undef  off_t
+# define off_t off64_t
+#endif
 
 #ifdef _WIN32
 static ssize_t pread(int fd, void *buf, size_t count, off_t offset)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/file/dirs_win32.c 
new/libbluray-0.9.2/src/file/dirs_win32.c
--- old/libbluray-0.9.1/src/file/dirs_win32.c   2015-05-15 11:25:06.000000000 
+0200
+++ new/libbluray-0.9.2/src/file/dirs_win32.c   2015-11-19 17:34:00.000000000 
+0100
@@ -38,8 +38,16 @@
 {
     wchar_t wdir[MAX_PATH];
     if (S_OK != SHGetFolderPathW(NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, 
wdir)) {
-        GetWindowsDirectoryW(wdir, MAX_PATH);
-        wcscat(wdir, L"\\fonts");
+        int lenght = GetWindowsDirectoryW(wdir, MAX_PATH);
+        if (lenght == 0 || lenght > (MAX_PATH - 8)) {
+            BD_DEBUG(DBG_FILE, "Font directory path too long!\n");
+            return NULL;
+        }
+        if (!wcscat(wdir, L"\\fonts")) {
+            BD_DEBUG(DBG_FILE, "Could not construct font directory path!\n");
+            return NULL;
+        }
+
     }
 
     int   len  = WideCharToMultiByte (CP_UTF8, 0, wdir, -1, NULL, 0, NULL, 
NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/file/file_posix.c 
new/libbluray-0.9.2/src/file/file_posix.c
--- old/libbluray-0.9.1/src/file/file_posix.c   2015-05-15 11:25:06.000000000 
+0200
+++ new/libbluray-0.9.2/src/file/file_posix.c   2015-11-26 11:11:26.000000000 
+0100
@@ -38,6 +38,13 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#ifdef __ANDROID__
+# undef  lseek
+# define lseek lseek64
+# undef  off_t
+# define off_t off64_t
+#endif
+
 static void _file_close(BD_FILE_H *file)
 {
     if (file) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/file/mount.c 
new/libbluray-0.9.2/src/file/mount.c
--- old/libbluray-0.9.1/src/file/mount.c        2015-01-26 09:01:57.000000000 
+0100
+++ new/libbluray-0.9.2/src/file/mount.c        2015-11-26 11:11:26.000000000 
+0100
@@ -33,6 +33,7 @@
 
 char *mount_get_mountpoint(const char *device_path)
 {
+#ifndef __ANDROID__
 #ifdef HAVE_MNTENT_H
     struct stat st;
     if (stat (device_path, &st) ) {
@@ -62,6 +63,7 @@
         endmntent (f);
     }
 #endif /* HAVE_MNTENT_H */
+#endif /*  __ANDROID__ */
 
     return str_dup(device_path);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/libbluray/bdj/bdj.c 
new/libbluray-0.9.2/src/libbluray/bdj/bdj.c
--- old/libbluray-0.9.1/src/libbluray/bdj/bdj.c 2015-11-03 22:01:43.000000000 
+0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/bdj.c 2015-11-22 11:10:40.000000000 
+0100
@@ -26,6 +26,7 @@
 
 #include "native/register_native.h"
 
+#include "file/file.h"
 #include "file/dirs.h"
 #include "file/dl.h"
 #include "util/strutl.h"
@@ -41,9 +42,6 @@
 #ifdef _WIN32
 #include <windows.h>
 #include <winreg.h>
-#define DIR_SEP "\\"
-#else
-#define DIR_SEP "/"
 #endif
 
 #ifdef HAVE_BDJ_J2ME
@@ -67,7 +65,7 @@
 
     wchar_t buf_loc[4096] = L"SOFTWARE\\JavaSoft\\Java Runtime Environment\\";
     wchar_t buf_vers[128];
-
+    wchar_t java_path[4096] = L"";
     char strbuf[256];
 
     LONG r;
@@ -108,6 +106,9 @@
         WideCharToMultiByte(CP_UTF8, 0, buf_loc, -1, java_home, 
sizeof(java_home), NULL, NULL);
         *p_java_home = java_home;
         BD_DEBUG(DBG_BDJ, "JavaHome: %s\n", java_home);
+
+        wcscat(java_path, buf_loc);
+        wcscat(java_path, L"\\bin");
     }
 
     dSize = sizeof(buf_loc);
@@ -119,7 +120,9 @@
         return NULL;
     }
 
+    SetDllDirectoryW(java_path);
     void *result = LoadLibraryW(buf_loc);
+    SetDllDirectoryW(NULL);
 
     WideCharToMultiByte(CP_UTF8, 0, buf_loc, -1, strbuf, sizeof(strbuf), NULL, 
NULL);
     if (!result) {
@@ -132,6 +135,35 @@
 }
 #endif
 
+#ifdef _WIN32
+static inline char *_utf8_to_cp(const char *utf8)
+{
+    int wlen = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
+    if (wlen == 0) {
+        return NULL;
+    }
+
+    wchar_t *wide = (wchar_t *)malloc(wlen * sizeof(wchar_t));
+    if (!wide) {
+        return NULL;
+    }
+    MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wide, wlen);
+
+    size_t len = WideCharToMultiByte(CP_ACP, 0, wide, -1, NULL, 0, NULL, NULL);
+    if (len == 0) {
+        X_FREE(wide);
+        return NULL;
+    }
+
+    char *out = (char *)malloc(len);
+    if (out != NULL) {
+        WideCharToMultiByte(CP_ACP, 0, wide, -1, out, len, NULL, NULL);
+    }
+    X_FREE(wide);
+    return out;
+}
+#endif
+
 static void *_jvm_dlopen(const char *java_home, const char *jvm_dir, const 
char *jvm_lib)
 {
     if (java_home) {
@@ -212,17 +244,17 @@
 
 static int _can_read_file(const char *fn)
 {
-    FILE *fp;
+    BD_FILE_H *fp;
 
     if (!fn) {
         return 0;
     }
 
-    fp = fopen(fn, "rb");
+    fp = file_open(fn, "rb");
     if (fp) {
-        char b;
-        int result = (int)fread(&b, 1, 1, fp);
-        fclose(fp);
+        uint8_t b;
+        int result = (int)file_read(fp, &b, 1);
+        file_close(fp);
         if (result == 1) {
             return 1;
         }
@@ -514,6 +546,17 @@
     args.options = option;
     args.ignoreUnrecognized = JNI_FALSE; // don't ignore unrecognized options
 
+#ifdef _WIN32
+    /* ... in windows, JVM options are not UTF8 but current system code page 
... */
+    /* luckily, most BD-J options can be passed in as java strings later. But, 
not class path. */
+    int ii;
+    for (ii = 0; ii < n; ii++) {
+        char *tmp = _utf8_to_cp(option[ii].optionString);
+        X_FREE(option[ii].optionString);
+        option[ii].optionString = tmp;
+    }
+#endif
+
     int result = JNI_CreateJavaVM_fp(jvm, (void**) env, &args);
 
     while (--n >= 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
 
new/libbluray-0.9.2/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
--- 
old/libbluray-0.9.1/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
   2015-11-03 22:01:43.000000000 +0100
+++ 
new/libbluray-0.9.2/src/libbluray/bdj/java/com/aacsla/bluray/online/ContentAttribute.java
   2015-11-22 10:31:01.000000000 +0100
@@ -50,6 +50,10 @@
         try {
             is = new FileInputStream(
                 System.getProperty("bluray.vfs.root") + File.separator + file);
+        } catch (Exception e) {
+            return null;
+        }
+        try {
             if (is.skip(14) != 14)
                 return null;
             byte[] bytes = new byte[6];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDFontMetrics.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDFontMetrics.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDFontMetrics.java      
2015-05-15 11:25:06.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDFontMetrics.java      
2015-12-01 13:22:18.000000000 +0100
@@ -192,7 +192,12 @@
     }
 
     static synchronized String[] getFontList() {
-        init();
+        try {
+            init();
+        } catch (Throwable t) {
+            System.err.println("getFontList() failed: " + t);
+            return new String[0];
+        }
 
         ArrayList fontNames = new ArrayList();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java     
2015-04-10 08:39:25.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java     
2015-12-01 13:22:14.000000000 +0100
@@ -306,7 +306,7 @@
         Rectangle rect = new Rectangle(x, y, length, 1);
         rect = actualClip.intersection(rect);
 
-        if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0) {
+        if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0 || 
backBuffer == null) {
             return;
         }
 
@@ -364,7 +364,7 @@
         Rectangle rect = new Rectangle(x, y, length, 1);
         rect = actualClip.intersection(rect);
 
-        if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0) {
+        if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0 || 
backBuffer == null) {
             return;
         }
 
@@ -458,7 +458,7 @@
         y += originY;
         Rectangle rect = new Rectangle(x, y, w, h);
         rect = actualClip.intersection(rect);
-        if (rect.isEmpty()) {
+        if (rect.isEmpty() || backBuffer == null) {
             return;
         }
         x = rect.x;
@@ -572,7 +572,7 @@
         Rectangle rect = new Rectangle(x, y, w, h);
         rect = actualClip.intersection(rect);
 
-        if (rect.width <= 0 || rect.height <= 0) {
+        if (rect.width <= 0 || rect.height <= 0 || backBuffer == null) {
             return;
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDImageConsumer.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDImageConsumer.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDImageConsumer.java    
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDImageConsumer.java    
2015-11-19 17:34:00.000000000 +0100
@@ -25,7 +25,7 @@
 import java.awt.image.ImageConsumer;
 import java.awt.image.ColorModel;
 
-public class BDImageConsumer extends BDImage implements ImageConsumer {
+class BDImageConsumer extends BDImage implements ImageConsumer {
     private Hashtable properties;
     private ImageProducer producer;
     private int status;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDWindowGraphics.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDWindowGraphics.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/BDWindowGraphics.java   
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/BDWindowGraphics.java   
2015-12-01 12:38:23.000000000 +0100
@@ -39,6 +39,7 @@
     }
 
     public void clearRect(int x, int y, int w, int h) {
+        if (window == null) return;
         synchronized (window) {
             super.clearRect(x, y, w, h);
             window.notifyChanged();
@@ -46,6 +47,7 @@
     }
 
     public void fillRect(int x, int y, int w, int h) {
+        if (window == null) return;
         synchronized (window) {
             super.fillRect(x, y, w, h);
             window.notifyChanged();
@@ -53,6 +55,7 @@
     }
 
     public void drawRect(int x, int y, int w, int h) {
+        if (window == null) return;
         synchronized (window) {
             super.drawRect(x, y, w, h);
             window.notifyChanged();
@@ -60,6 +63,7 @@
     }
 
     public void drawLine(int x1, int y1, int x2, int y2) {
+        if (window == null) return;
         synchronized (window) {
             super.drawLine(x1, y1, x2, y2);
             window.notifyChanged();
@@ -67,6 +71,7 @@
     }
 
     public void copyArea(int x, int y, int w, int h, int dx, int dy) {
+        if (window == null) return;
         synchronized (window) {
             super.copyArea(x, y, w, h, dx, dy);
             window.notifyChanged();
@@ -74,6 +79,7 @@
     }
 
     public void drawPolyline(int xPoints[], int yPoints[], int nPoints) {
+        if (window == null) return;
         synchronized (window) {
             super.drawPolyline(xPoints, yPoints, nPoints);
             window.notifyChanged();
@@ -81,6 +87,7 @@
     }
 
     public void drawPolygon(int xPoints[], int yPoints[], int nPoints) {
+        if (window == null) return;
         synchronized (window) {
             super.drawPolygon(xPoints, yPoints, nPoints);
             window.notifyChanged();
@@ -88,6 +95,7 @@
     }
 
     public void fillPolygon(int xPoints[], int yPoints[], int nPoints) {
+        if (window == null) return;
         synchronized (window) {
             super.fillPolygon(xPoints, yPoints, nPoints);
             window.notifyChanged();
@@ -95,6 +103,7 @@
     }
 
     public void drawOval(int x, int y, int w, int h) {
+        if (window == null) return;
         synchronized (window) {
             super.drawOval(x, y, w, h);
             window.notifyChanged();
@@ -102,6 +111,7 @@
     }
 
     public void fillOval(int x, int y, int w, int h) {
+        if (window == null) return;
         synchronized (window) {
             super.fillOval(x, y, w, h);
             window.notifyChanged();
@@ -109,6 +119,7 @@
     }
 
     public void drawArc(int x, int y, int w, int h, int startAngle, int 
endAngle) {
+        if (window == null) return;
         synchronized (window) {
             super.drawArc(x, y, w, h, startAngle, endAngle);
             window.notifyChanged();
@@ -116,6 +127,7 @@
     }
 
     public void fillArc(int x, int y, int w, int h, int startAngle, int 
endAngle) {
+        if (window == null) return;
         synchronized (window) {
             super.fillArc(x, y, w, h, startAngle, endAngle);
             window.notifyChanged();
@@ -123,6 +135,7 @@
     }
 
     public void drawRoundRect(int x, int y, int w, int h, int arcWidth, int 
arcHeight) {
+        if (window == null) return;
         synchronized (window) {
             super.drawRoundRect(x, y, w, h, arcWidth, arcHeight);
             window.notifyChanged();
@@ -130,6 +143,7 @@
     }
 
     public void fillRoundRect(int x, int y, int w, int h, int arcWidth, int 
arcHeight) {
+        if (window == null) return;
         synchronized (window) {
             super.fillRoundRect(x, y, w, h, arcWidth, arcHeight);
             window.notifyChanged();
@@ -137,6 +151,7 @@
     }
 
     protected void drawStringN(long ftFace, String string, int x, int y, int 
rgb) {
+        if (window == null) return;
         synchronized (window) {
             super.drawStringN(ftFace, string, x, y, rgb);
             window.notifyChanged();
@@ -154,6 +169,8 @@
         boolean flipX, boolean flipY,
         Color bg, ImageObserver observer) {
 
+        if (window == null) return true;
+
         synchronized (window) {
             boolean complete = super.drawImageN(
                 img, dx, dy, dw, dh, sx, sy, sw, sh,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/Font.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/Font.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/java/awt/Font.java       
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/java/awt/Font.java       
2015-11-08 21:59:16.000000000 +0100
@@ -198,6 +198,9 @@
     public Font deriveFont(int style, int size) {
         return new Font(name, style, size, fontFile, family);
     }
+    public Font deriveFont(int style, float size) {
+        return new Font(name, style, (int)size, fontFile, family);
+    }
 
     /* constructor */
     private Font(String name, int style, int size, File fontFile, String 
family) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/bluray/net/BDLocator.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/bluray/net/BDLocator.java    
2015-05-15 11:25:06.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/bluray/net/BDLocator.java    
2015-12-01 13:22:18.000000000 +0100
@@ -29,11 +29,11 @@
         super(url);
         try {
 
-        if (!url.startsWith("bd://"))
-            throw new InvalidLocatorException();
-        String str = url.substring(5);
-        if (!parseJar(str) && !parseSound(str) && !parsePlaylist(str))
-            throw new InvalidLocatorException();
+            if (!url.startsWith("bd://"))
+                throw new InvalidLocatorException();
+            String str = url.substring(5);
+            if (!parseJar(str) && !parseSound(str) && !parsePlaylist(str))
+                throw new InvalidLocatorException();
 
         } catch (InvalidLocatorException e) {
             System.err.println("Invalid locator: " + url);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
--- 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
        2015-01-26 09:01:57.000000000 +0100
+++ 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/dvb/io/persistent/FileAttributes.java
        2015-12-01 13:22:18.000000000 +0100
@@ -78,9 +78,9 @@
     {
         boolean r = f.canRead();
         boolean w = f.canWrite();
-        
+
         FileAccessPermissions permissions = new FileAccessPermissions(r, w, r, 
w, r, w);
-        
+
         return new FileAttributes(null, permissions, PRIORITY_LOW);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJClassFileTransformer.java
 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJClassFileTransformer.java
--- 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJClassFileTransformer.java
        2015-11-03 22:01:43.000000000 +0100
+++ 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJClassFileTransformer.java
        2015-11-08 19:03:37.000000000 +0100
@@ -20,7 +20,7 @@
 package org.videolan;
 
 /**
- * This is a class which is called by java.lang.ClassLoader
+ * This is a class which is called by BDJClassLoader
  * when ClassFormatError is thrown inside defineClass().
  *
  * Some discs have invalid debug info in class files (broken by
@@ -32,8 +32,6 @@
  *       in class file com/tcs/blr/bluray/pal/fox/controller/d
  */
 
-import sun.misc.ClassFileTransformer;
-
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassWriter;
 import org.objectweb.asm.ClassVisitor;
@@ -41,7 +39,7 @@
 import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Attribute;
 
-public class BDJClassFileTransformer extends ClassFileTransformer
+class BDJClassFileTransformer
 {
     public byte[] transform(byte[] b, int off, int len)
         throws ClassFormatError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java 
2015-02-28 17:45:26.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJClassLoader.java 
2015-11-08 19:03:37.000000000 +0100
@@ -21,6 +21,7 @@
 
 import java.net.MalformedURLException;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.InputStream;
 import java.io.IOException;
@@ -126,7 +127,87 @@
             }
             return c;
         }
-        return super.loadClass(name);
+
+        try {
+            return super.loadClass(name);
+        } catch (ClassNotFoundException e0) {
+            logger.error("ClassNotFoundException: " + name);
+            throw e0;
+        } catch (Error err) {
+            logger.error("FATAL: " + err);
+            throw err;
+        }
+    }
+
+    private byte[] loadClassCode(String name) throws ClassNotFoundException {
+        String path = name.replace('.', '/').concat(".class");
+
+        URL res = super.findResource(path);
+        if (res == null) {
+            logger.error("loadClassCode(): resource for class " + name + "not 
found");
+            throw new ClassNotFoundException(name);
+        }
+
+        InputStream is = null;
+        ByteArrayOutputStream os = null;
+        try {
+            is = res.openStream();
+            os = new ByteArrayOutputStream();
+            byte[] buffer = new byte[0xffff];
+            while (true) {
+                int r = is.read(buffer);
+                if (r == -1) break;
+                os.write(buffer, 0, r);
+            }
+
+            return os.toByteArray();
+
+        } catch (Exception e) {
+            logger.error("loadClassCode(" + name + ") failed: " + e);
+            throw new ClassNotFoundException(name);
+
+        } finally {
+            try {
+                if (is != null)
+                    is.close();
+            } catch (IOException ioe) {
+            }
+            try {
+                if (os != null)
+                    os.close();
+            } catch (IOException ioe) {
+            }
+        }
+    }
+
+    protected Class findClass(String name) throws ClassNotFoundException {
+        try {
+            return super.findClass(name);
+
+        } catch (ClassFormatError ce) {
+
+            /* try to "fix" broken class file */
+            /* if we got ClassFormatError, package was already created. */
+            byte[] b = loadClassCode(name);
+            if (b == null) {
+                logger.error("loadClassCode(" + name + ") failed");
+                /* this usually kills Xlet ... */
+                throw ce;
+            }
+            try {
+                b = new BDJClassFileTransformer().transform(b, 0, b.length);
+                return defineClass(b, 0, b.length);
+            } catch (ThreadDeath td) {
+                throw td;
+            } catch (Throwable t) {
+                logger.error("Class rewriting failed: " + t);
+                throw new ClassNotFoundException(name);
+            }
+
+        } catch (Error er) {
+            logger.error("Unexpected error: " + er + " " + 
Logger.dumpStack(er));
+            throw er;
+        }
     }
 
     public URL getResource(String name) {
@@ -157,4 +238,6 @@
     }
 
     private String xletClass;
+
+    private static final Logger logger = 
Logger.getLogger(BDJClassLoader.class.getName());
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
--- 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java 
    2015-11-03 22:01:43.000000000 +0100
+++ 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java 
    2015-12-01 12:38:23.000000000 +0100
@@ -76,6 +76,14 @@
                 }
                 deny(perm);
             }
+
+            // work around bug in openjdk 7 / 8
+            // sun.awt.AWTAutoShutdown.notifyThreadBusy is missing 
doPrivileged()
+            // (fixed in jdk9 / 
http://hg.openjdk.java.net/jdk9/client/jdk/rev/5b613a3c04be )
+            if (classDepth("sun.awt.AWTAutoShutdown") > 0) {
+                return;
+            }
+
             if (perm.implies(new RuntimePermission("modifyThreadGroup"))) {
                 /* do check here (no need to log failures) */
                 super.checkPermission(perm);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJUtil.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJUtil.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJUtil.java        
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJUtil.java        
2015-11-24 09:19:08.000000000 +0100
@@ -25,20 +25,31 @@
     /**
      * Make a five digit zero padded string based on an integer
      * Ex. integer 1 -> string "00001"
-     * 
+     *
      * @param id
      * @return
      */
-    public static String makeFiveDigitStr(int id) 
+    public static String makeFiveDigitStr(int id)
     {
+        if (id < 0 || id > 99999) {
+            System.err.println("Invalid ID: " + id);
+            throw new IllegalArgumentException("Invalid ID " + id);
+        }
+        String s = "" + id;
+        while (s.length() < 5) {
+            s = "0" + s;
+        }
+        return s;
+        /*
         DecimalFormat fmt = new DecimalFormat();
         fmt.setMaximumIntegerDigits(5);
         fmt.setMinimumIntegerDigits(5);
         fmt.setGroupingUsed(false);
-        
+
         return fmt.format(id);
+        */
     }
-    
+
     /**
      * Make a path based on the disc root to an absolute path based on the 
filesystem of the computer
      * Ex. /BDMV/JAR/00000.jar -> /bluray/disc/mount/point/BDMV/JAR/00000.jar
@@ -47,6 +58,11 @@
      */
     public static String discRootToFilesystem(String path)
     {
-        return System.getProperty("bluray.vfs.root") + path;
+        String vfsRoot = System.getProperty("bluray.vfs.root");
+        if (vfsRoot == null) {
+            System.err.println("discRootToFilesystem(): disc root not set !");
+            return path;
+        }
+        return vfsRoot + path;
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJXletContext.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/BDJXletContext.java 
2015-08-06 14:18:26.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/BDJXletContext.java 
2015-11-23 20:48:41.000000000 +0100
@@ -80,6 +80,8 @@
     }
 
     public String getXletHome() {
+        if (homeMountPoint == null)
+            logger.error("Home directory not mounted!");
         return homeMountPoint;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/Libbluray.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/Libbluray.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/Libbluray.java      
2015-11-03 22:01:43.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/Libbluray.java      
2015-12-01 12:38:23.000000000 +0100
@@ -60,6 +60,7 @@
                         if (ctx != null) {
                             return ctx.getXletHome();
                         }
+                        System.err.println("getProperty(user.dir): no context 
!  " + Logger.dumpStack());
                     }
                     return super.getProperty(key);
                 }
@@ -81,13 +82,6 @@
             System.err.println("hookProperties() failed: " + t);
         }
 
-        /* hook class loading (fix invalid class files) */
-        try {
-            sun.misc.ClassFileTransformer.add(new BDJClassFileTransformer());
-        } catch (Throwable t) {
-            System.err.println("Adding class file transformer failed: " + t);
-        }
-
         /* hook sockets (limit network connections) */
         try {
             BDJSocketFactory.init();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/MountManager.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/MountManager.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/MountManager.java   
2015-08-06 14:18:26.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/MountManager.java   
2015-11-23 20:54:08.000000000 +0100
@@ -221,7 +221,7 @@
         if (mountPoint != null) {
             return mountPoint.getMountPoint();
         } else {
-            logger.info("JAR " + jarId + " not mounted");
+            logger.error("JAR " + jarId + " not mounted");
         }
         return null;
     }
@@ -247,6 +247,7 @@
             if (dir != null) {
                 return dir.getAbsolutePath();
             }
+            logger.error("getMountPoint(): already unmounted !");
             return null;
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/TitleInfo.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/TitleInfo.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/TitleInfo.java      
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/TitleInfo.java      
2015-11-22 11:17:19.000000000 +0100
@@ -24,7 +24,7 @@
         this.objType = objType;
         this.playbackType = playbackType;
         if (objType == OBJ_TYPE_BDJ)
-            this.bdjoName = (new 
java.text.DecimalFormat("00000")).format(idRef);
+            this.bdjoName = (BDJUtil.makeFiveDigitStr(idRef));
         else
             this.hdmvOID = idRef;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/VFSCache.java 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/VFSCache.java
--- old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/VFSCache.java       
2015-04-06 18:13:40.000000000 +0200
+++ new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/VFSCache.java       
2015-11-24 19:11:56.000000000 +0100
@@ -270,16 +270,19 @@
         accessFileSynced(absPath);
     }
 
-    protected synchronized void accessFileSynced(String absPath) {
+    private synchronized void accessFileSynced(String absPath) {
 
         if (inAccessFile) {
             /* avoid recursion from SecurityManager checks */
             return;
         }
 
-        inAccessFile = true;
-        accessFileImp(absPath);
-        inAccessFile = false;
+        try {
+            inAccessFile = true;
+            accessFileImp(absPath);
+        } finally {
+            inAccessFile = false;
+        }
     }
 
     private void accessFileImp(String absPath) {
@@ -297,7 +300,7 @@
         }
 
         /* do not cache .m2ts streams */
-        if (relPath.startsWith("BDMV" + File.separator + "STREAM" + 
File.separator)) {
+        if (relPath.startsWith(streamDir)) {
             return;
         }
 
@@ -352,6 +355,7 @@
 
     private static final String jarDir = "BDMV" + File.separator + "JAR" + 
File.separator;
     private static final String fontDir = "BDMV" + File.separator + "AUXDATA" 
+ File.separator;
+    private static final String streamDir = "BDMV" + File.separator + "STREAM" 
+ File.separator;
 
     private static final Logger logger = 
Logger.getLogger(VFSCache.class.getName());
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
--- 
old/libbluray-0.9.1/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
        2015-05-15 11:25:06.000000000 +0200
+++ 
new/libbluray-0.9.2/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
        2015-11-23 10:10:16.000000000 +0100
@@ -67,10 +67,13 @@
 
     public BDHandler() {
         ownerContext = BDJXletContext.getCurrentContext();
-
-        PlayerAction action = new PlayerAction(this, PlayerAction.ACTION_INIT, 
null);
-        BDJActionManager.getInstance().putCommand(action);
-        action.waitEnd();
+        if (ownerContext == null) {
+            doInitAction();
+        } else {
+            PlayerAction action = new PlayerAction(this, 
PlayerAction.ACTION_INIT, null);
+            BDJActionManager.getInstance().putCommand(action);
+            action.waitEnd();
+        }
     }
 
     private void doInitAction() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libbluray-0.9.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c 
new/libbluray-0.9.2/src/libbluray/bdj/native/java_awt_BDFontMetrics.c
--- old/libbluray-0.9.1/src/libbluray/bdj/native/java_awt_BDFontMetrics.c       
2015-01-26 09:01:57.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bdj/native/java_awt_BDFontMetrics.c       
2015-11-19 17:34:00.000000000 +0100
@@ -135,7 +135,10 @@
 
     memset(&lf, 0, sizeof(lf));
     lf.lfCharSet = DEFAULT_CHARSET;
-    MultiByteToWideChar(CP_UTF8, 0, family, -1, lf.lfFaceName, 
sizeof(lf.lfFaceName));
+    int length = MultiByteToWideChar(CP_UTF8, 0, family, -1, lf.lfFaceName, 
LF_FACESIZE);
+    if (!length) {
+        return NULL;
+    }
 
     hDC = GetDC(NULL);
     EnumFontFamiliesExW(hDC, &lf, (FONTENUMPROCW)&EnumFontCallbackW, 
(LPARAM)&data, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/libbluray/bluray-version.h 
new/libbluray-0.9.2/src/libbluray/bluray-version.h
--- old/libbluray-0.9.1/src/libbluray/bluray-version.h  2015-11-03 
22:02:19.000000000 +0100
+++ new/libbluray-0.9.2/src/libbluray/bluray-version.h  2015-12-01 
13:31:53.000000000 +0100
@@ -27,9 +27,9 @@
 
 #define BLURAY_VERSION_MAJOR 0
 #define BLURAY_VERSION_MINOR 9
-#define BLURAY_VERSION_MICRO 1
+#define BLURAY_VERSION_MICRO 2
 
-#define BLURAY_VERSION_STRING "0.9.1"
+#define BLURAY_VERSION_STRING "0.9.2"
 
 #define BLURAY_VERSION \
     BLURAY_VERSION_CODE(BLURAY_VERSION_MAJOR, BLURAY_VERSION_MINOR, 
BLURAY_VERSION_MICRO)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/libbluray/bluray.c 
new/libbluray-0.9.2/src/libbluray/bluray.c
--- old/libbluray-0.9.1/src/libbluray/bluray.c  2015-11-03 22:01:43.000000000 
+0100
+++ new/libbluray-0.9.2/src/libbluray/bluray.c  2015-12-01 12:38:23.000000000 
+0100
@@ -798,7 +798,15 @@
 
     /* allocate buffer */
     p->clip_size = (size_t)st.clip_size;
-    p->buf       = realloc(p->buf, p->clip_size);
+    uint8_t* tmp = (uint8_t*)realloc(p->buf, p->clip_size);
+    if (!tmp) {
+        BD_DEBUG(DBG_BLURAY | DBG_CRIT, "_preload_m2ts(): out of memory\n");
+        _close_m2ts(&st);
+        _close_preload(p);
+        return 0;
+    }
+
+    p->buf = tmp;
 
     /* read clip to buffer */
 
@@ -2788,6 +2796,9 @@
     bd_mutex_lock(&bd->mutex);
 
     switch (stream_type) {
+        case BLURAY_AUDIO_STREAM:
+            bd_psr_write(bd->regs, PSR_PRIMARY_AUDIO_ID, stream_id & 0xff);
+            break;
         case BLURAY_PG_TEXTST_STREAM:
             bd_psr_write_bits(bd->regs, PSR_PG_STREAM,
                               ((!!enable_flag)<<31) | (stream_id & 0xfff),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/libbluray/bluray.h 
new/libbluray-0.9.2/src/libbluray/bluray.h
--- old/libbluray-0.9.1/src/libbluray/bluray.h  2015-10-02 11:16:57.000000000 
+0200
+++ new/libbluray-0.9.2/src/libbluray/bluray.h  2015-11-09 13:59:19.000000000 
+0100
@@ -553,6 +553,7 @@
  * @param stream_id  stream number (1..N)
  * @param enable_flag  set to 0 to disable streams of this type
  */
+#define BLURAY_AUDIO_STREAM      0
 #define BLURAY_PG_TEXTST_STREAM  1
 
 void bd_select_stream(BLURAY *bd, uint32_t stream_type, uint32_t stream_id, 
uint32_t enable_flag);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libbluray-0.9.1/src/util/logging.c 
new/libbluray-0.9.2/src/util/logging.c
--- old/libbluray-0.9.1/src/util/logging.c      2015-05-15 11:25:06.000000000 
+0200
+++ new/libbluray-0.9.2/src/util/logging.c      2015-12-01 13:22:14.000000000 
+0100
@@ -81,19 +81,34 @@
 
     if (mask & debug_mask) {
         const char *f = strrchr(file, DIR_SEP_CHAR);
-        char buffer[4096], *pt = buffer;
+        char buffer[4096];
         va_list args;
+        int len, len2;
 
-        pt += sprintf(buffer, "%s:%d: ", f ? f + 1 : file, line);
+        len = sprintf(buffer, "%s:%d: ", f ? f + 1 : file, line);
+        if (len < 0) {
+            return;
+        }
 
         va_start(args, format);
-        vsnprintf(pt, sizeof(buffer) - (size_t)(intptr_t)(pt - buffer) - 1, 
format, args);
+        len2 = vsnprintf(buffer + len, sizeof(buffer) - len - 1, format, args);
         va_end(args);
 
+        if (len2 < 0) {
+            return;
+        }
+
         if (log_func) {
+            buffer[sizeof(buffer)-1] = 0;
             log_func(buffer);
+
         } else {
-            fprintf(logfile, "%s", buffer);
+            len += len2;
+            if ((size_t)len >= sizeof(buffer)) {
+                len = sizeof(buffer);
+            }
+
+            fwrite(buffer, len, 1, logfile);
         }
     }
 }

++++++ libbluray-autotools.patch ++++++
--- /var/tmp/diff_new_pack.OM7KPM/_old  2015-12-09 19:33:08.000000000 +0100
+++ /var/tmp/diff_new_pack.OM7KPM/_new  2015-12-09 19:33:08.000000000 +0100
@@ -1,67 +1,65 @@
---- configure.ac.orig  2015-04-10 08:48:23.000000000 +0200
-+++ configure.ac       2015-04-30 13:56:24.249955300 +0200
-@@ -111,9 +111,10 @@
-   [BDJ_BOOTCLASSPATH=])
- 
- dnl required programs
--AC_PROG_CC
-+AC_PROG_CC_STDC
- AM_PROG_CC_C_O
--AC_PROG_LIBTOOL
-+AC_USE_SYSTEM_EXTENSIONS
-+LT_INIT([disable-static pic-only])
- 
- dnl required types
- AC_TYPE_SIGNAL
-@@ -128,23 +129,12 @@
- 
- dnl required system services
- AC_SYS_LARGEFILE
-+AC_FUNC_FSEEKO
- 
- dnl required functions
- AC_CHECK_FUNC([snprintf],, [AC_MSG_ERROR($function_not_found)])
- 
--dnl required libraries
--dnl pthreads (not on win32)
--AS_IF([test "${SYS}" != "mingw32"], [
--  AC_CHECK_HEADERS([pthread.h], ,
--    [AC_MSG_ERROR([pthread required])])
--  AC_SEARCH_LIBS([pthread_create], [pthread], ,
--    [AC_MSG_ERROR([pthread required])])
--  AC_SEARCH_LIBS([dlopen], [dl])
--  DLOPEN_LIBS="$ac_cv_search_dlopen"
--  AS_CASE([$DLOPEN_LIBS],
--    [no|none\ required], [DLOPEN_LIBS=""])
--  AC_SUBST([DLOPEN_LIBS])
--])
-+AC_CHECK_HEADERS_ONCE([pthread.h])
- 
- dnl libxml2 for metadata parser
- AS_IF([test "x$with_libxml2" != "xno"], [
---- Makefile.am.orig   2015-03-20 11:50:37.000000000 +0100
-+++ Makefile.am        2015-04-30 13:56:25.578037800 +0200
-@@ -11,10 +11,10 @@
- POSIX_C_SOURCE=200112L
- endif
- 
--SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) 
-D_REENTRANT
- SET_INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libbluray 
-I$(top_builddir)/src/libbluray $(BDJAVA_CFLAGS)
- 
--AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) 
$(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(UDF_CFLAGS)
-+AM_CFLAGS = -pthread $(LIBXML2_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) 
$(UDF_CFLAGS)
-+AM_CPPFLAGS = $(SET_INCLUDES) -include config.h
- 
- EXTRA_DIST = \
-       bootstrap \
-@@ -149,8 +149,8 @@
- endif
- endif
- 
--libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) -export-symbols-regex 
"^bd_"
--libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS)
-+libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO)
-+libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS) -ldl
- 
- noinst_HEADERS = \
-       jni/jni.h \
+--- configure.ac.orig  2015-04-10 08:48:23.000000000 +0200
++++ configure.ac       2015-04-30 13:56:24.249955300 +0200
+@@ -111,9 +111,10 @@
+   [BDJ_BOOTCLASSPATH=])
+ 
+ dnl required programs
+-AC_PROG_CC
++AC_PROG_CC_STDC
+ AM_PROG_CC_C_O
+-AC_PROG_LIBTOOL
++AC_USE_SYSTEM_EXTENSIONS
++LT_INIT([disable-static pic-only])
+ 
+ dnl required types
+ AC_TYPE_SIGNAL
+@@ -128,23 +129,12 @@
+ 
+ dnl required system services
+ AC_SYS_LARGEFILE
++AC_FUNC_FSEEKO
+ 
+ dnl required functions
+ AC_CHECK_FUNC([snprintf],, [AC_MSG_ERROR($function_not_found)])
+ 
+-dnl required libraries
+-dnl pthreads (not on win32)
+-AS_IF([test "${SYS}" != "mingw32"], [
+-  AC_CHECK_HEADERS([pthread.h], ,
+-    [AC_MSG_ERROR([pthread required])])
+-  AC_SEARCH_LIBS([pthread_create], [pthread], ,
+-    [AC_MSG_ERROR([pthread required])])
+-  AC_SEARCH_LIBS([dlopen], [dl])
+-  DLOPEN_LIBS="$ac_cv_search_dlopen"
+-  AS_CASE([$DLOPEN_LIBS],
+-    [no|none\ required], [DLOPEN_LIBS=""])
+-  AC_SUBST([DLOPEN_LIBS])
+-])
++AC_CHECK_HEADERS_ONCE([pthread.h])
+ 
+ dnl libxml2 for metadata parser
+ AS_IF([test "x$with_libxml2" != "xno"], [
+--- Makefile.am.orig   2015-11-25 09:00:27.000000000 +0100
++++ Makefile.am        2015-12-03 12:49:33.000000000 +0100
+@@ -11,10 +11,10 @@
+ POSIX_C_SOURCE=200112L
+ endif
+ 
+-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=$(POSIX_C_SOURCE) 
-D_REENTRANT
+ SET_INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/libbluray 
-I$(top_builddir)/src/libbluray $(BDJAVA_CFLAGS)
+ 
+-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) 
$(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(UDF_CFLAGS)
++AM_CFLAGS = -pthread $(LIBXML2_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) 
$(UDF_CFLAGS)
++AM_CPPFLAGS = $(SET_INCLUDES) -include config.h
+ 
+ EXTRA_DIST = \
+       bootstrap \
+@@ -151,7 +151,7 @@
+ endif
+ 
+ libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) 
-export-symbols-regex "^bd_"
+-libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS)
++libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) $(FONTCONFIG_LIBS) -ldl
+ 
+ noinst_HEADERS = \
+       jni/jni.h \

++++++ libbluray-jvm_dir.patch ++++++
--- /var/tmp/diff_new_pack.OM7KPM/_old  2015-12-09 19:33:08.000000000 +0100
+++ /var/tmp/diff_new_pack.OM7KPM/_new  2015-12-09 19:33:08.000000000 +0100
@@ -1,6 +1,6 @@
---- src/libbluray/bdj/bdj.c.orig       2015-04-06 18:25:09.000000000 +0200
-+++ src/libbluray/bdj/bdj.c    2015-04-30 13:56:26.765499800 +0200
-@@ -169,7 +169,7 @@
+--- src/libbluray/bdj/bdj.c.orig       2015-11-22 11:10:40.000000000 +0200
++++ src/libbluray/bdj/bdj.c    2015-12-03 12:54:21.000000000 +0100
+@@ -205,7 +205,7 @@
                                      "/usr/lib/jvm/java-6-openjdk",
                                      "/usr/lib/jvm/java-7-openjdk",
                                      "/etc/java-config-2/current-system-vm"};


Reply via email to