* work around Mac accent encoding issues

This commit is contained in:
Reinhard Pointner 2015-05-24 22:54:53 +00:00
parent 457c74129b
commit 3e4da0f254
1 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ public class MediaInfo implements Closeable {
}
private boolean openViaBuffer(RandomAccessFile f) throws IOException {
byte[] buffer = new byte[64 * 1024];
byte[] buffer = new byte[4 * 1024 * 1024]; // use large buffer to reduce JNA calls
int read = -1;
if (MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), 0) <= 0) {
@ -77,8 +77,8 @@ public class MediaInfo implements Closeable {
break;
}
if (MediaInfoLibrary.INSTANCE.Open_Buffer_Continue_GoTo_Get(handle) != -1) {
long gotoPos = MediaInfoLibrary.INSTANCE.Open_Buffer_Continue_GoTo_Get(handle);
if (gotoPos >= 0) {
f.seek(gotoPos);
MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), gotoPos);
}