当我使用FFmpegFrameRecorder录制视频时,它向我显示此错误
E/AndroidRuntime: FATAL EXCEPTION: Thread-36
java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes (1100M) > maxPhysicalBytes (1024M)
at org.bytedeco.javacpp.Pointer.deallocator(Pointer.java:588)
at org.bytedeco.javacpp.Pointer.init(Pointer.java:124)
at org.bytedeco.javacpp.avcodec$AVPacket.allocate(Native Method)
at org.bytedeco.javacpp.avcodec$AVPacket.<init>(avcodec.java:1516)
at java.lang.Thread.run(Thread.java:784)
。谁能帮助我解决此物理内存问题?
答案 0 :(得分:1)
您可能想在清单中添加大堆标签:
android:largeHeap="true"
https://developer.android.com/guide/topics/manifest/application-element
答案 1 :(得分:0)
此后已解决了内存泄漏: https://github.com/bytedeco/javacv/issues/1068