alfianrahmn / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

URLProtocolHandler truncates a jlong to an int #243

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
- Steps to reproduce the problem:

If bigMpgFile is a file with more than 2048MB, the following code return 
different values:

IContainer bigFileIContainer = IContainer.make(); 
bigFileIContainer.open(bigMpgFile.getAbsolutePath(),IContainer.Type.READ,iF
mt);
   System.out.println("File Duration : " + 
bigFileIContainer.getDuration());
   System.out.println("File Size : " + bigFileIContainer.getFileSize()); 

==> The above code prints duration and size alright.

RandomAccessFile raf = new RandomAccessFile(bigMpgFile,"r");
bigStreamIContainer.open((DataInput)raf,iFmt);
System.out.println("Stream Duration : " + 
bigStreamIContainer.getDuration());
System.out.println("Stream Size : " + bigStreamIContainer.getFileSize()); 

==> The above code fails to get duration and size (when file is bigger than 
2048MB).

 - Source of error:
http://code.google.com/p/xuggle/source/browse/trunk/java/xuggle-
xuggler/csrc/com/xuggle/xuggler/io/URLProtocolHandler.cpp#175

In this native method a jlong return value is being truncated in to a int 
(all the interaction with URLProtocolHandler is then broken).

- This results were obtained in Windows, JDK update 18.

Original issue reported on code.google.com by renato.c...@gmail.com on 1 Jun 2010 at 4:26

GoogleCodeExporter commented 8 years ago
Fixed in r1037

Original comment by art.cla...@gmail.com on 3 Jun 2010 at 1:14