Open shaoneng111 opened 11 months ago
If the problem doesn't occur without VideoComputeInfo, it's a problem with your VideoComputeInfo, not JavaCV.
thank you for your reply! but VideoComputeInfo is a simple java object , use java heap. i analysis the java heap memory, its looks like normal, so the leak occurs not in java heap?
If you can reproduce the issue without VideoComputeInfo, please provide such sample code.
thank you for your reply! but VideoComputeInfo is a simple java object , use java heap. i analysis the java heap memory, its looks like normal, so the leak occurs not in java heap?
and VideoComputeInfo should occupy very little memory, but actually it will eat 1G memory one day
i also want to know , Is the way I'm using javacv correct?
Looks alright, but the problem might also be caused by your InputStream. If you're not closing your InputStream, it can leak memory. If you want me to help, you'll need to come up with something that doesn't depend on your system.
i use gperftools analyze the memory. it look like ffmpeg apply the av_malloc memory , is this means it leaks?
hi, i find where is bug is. when FFmpegFrameGrabber input param is inputstream,it don't realease avformat and occurs memory leak. when i change FFmpegFrameGrabber input param from inputstream to file, memory leak disapears.
it look like avformat_free_context is invalid, should use avformat_close_input?
otherwise, in this issue : https://github.com/bytedeco/javacv/issues/911, someone has mensioned it, looks like the same problem with me.
Sounds like a fix. Please open a pull request!
avio_context_free(avio)
should be called here instead of av_free(avio)
@saudet
Maybe you need to call both
hi, i find where is bug is. when FFmpegFrameGrabber input param is inputstream,it don't realease avformat and occurs memory leak. when i change FFmpegFrameGrabber input param from inputstream to file, memory leak disapears. it look like avformat_free_context is invalid, should use avformat_close_input?
otherwise, in this issue : #911, someone has mensioned it, looks like the same problem with me.
hello,i had the same problem.How did you reslove it?
@Lwine Thanks for the fix!
@shaoneng111 Please give it a try with the snapshots: http://bytedeco.org/builds/
How to fix this javacv 1.5.9 memory leak ? Base in javacv keep version 1.5.9,not change
@saudet When will the 1.5.11 version be released to solve the memory leakage problem? https://github.com/bytedeco/javacv/pull/2214
environment : centos 6.8 jdk: java8 problem: memory is growing slowly
mycode:
i don't know what's wrong with it