sannies/mp4parser

java.lang.OutOfMemoryError: Direct buffer memory

JakeWoki opened this issue · 0 comments

java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:695)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
	at org.mp4parser.support.AbstractBox.parse(AbstractBox.java:95)
	at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:107)
	at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107)
	at org.mp4parser.IsoFile.<init>(IsoFile.java:55)
	at org.mp4parser.IsoFile.<init>(IsoFile.java:38)
	at com.xxx.controller.LiveController.update(LiveController.kt:84)
	at com.xxx.controller.LiveController.dvr$lambda-0(LiveController.kt:74)
	at java.lang.Thread.run(Thread.java:748)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
val fileName = "xxx.flv"
val file = File(fileName)
println("${fileName}======>>${file.length()}")
val isoFile = IsoFile(fileName)
println("${isoFile.movieBox.movieHeaderBox.duration}============")