* work around Mac accent encoding issues
This commit is contained in:
parent
457c74129b
commit
3e4da0f254
|
@ -63,7 +63,7 @@ public class MediaInfo implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean openViaBuffer(RandomAccessFile f) throws IOException {
|
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;
|
int read = -1;
|
||||||
|
|
||||||
if (MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), 0) <= 0) {
|
if (MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), 0) <= 0) {
|
||||||
|
@ -77,8 +77,8 @@ public class MediaInfo implements Closeable {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MediaInfoLibrary.INSTANCE.Open_Buffer_Continue_GoTo_Get(handle) != -1) {
|
long gotoPos = MediaInfoLibrary.INSTANCE.Open_Buffer_Continue_GoTo_Get(handle);
|
||||||
long gotoPos = MediaInfoLibrary.INSTANCE.Open_Buffer_Continue_GoTo_Get(handle);
|
if (gotoPos >= 0) {
|
||||||
f.seek(gotoPos);
|
f.seek(gotoPos);
|
||||||
MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), gotoPos);
|
MediaInfoLibrary.INSTANCE.Open_Buffer_Init(handle, f.length(), gotoPos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue