Closed bhutten14 closed 4 years ago
Thank you for reporting this issue. I will try to fix it in the next days. Your code is correct, ImageData
objects are disposed automatically.
We are also having this issue. Can we provide any info that would help diagnose the problem?
BTW, if I comment out this line: https://github.com/radek-k/FFMediaToolkit/blob/master/FFMediaToolkit/src/Decoding/MediaFile.cs#L86, then the crash goes away. Of course this probably creates some memory leaks, but just mentioning it in case that makes it clearer where the problem may be.
This fixes the crash, but might be more heavy-handed than you prefer: https://github.com/radek-k/FFMediaToolkit/pull/17. EDIT: No, this is not a good fix after all. I closed it. This only fixed the crash because it stopped actually releasing the native pointers.
I've just released the fixed v2.1.1 version on Nuget. I have deleted the ffmpeg.avcodec_free_context()
call which can only be used manually in encoding. The ffmpeg.avformat_close_input()
method calls it automatically.
Perfect - you just beat me to it: https://github.com/Claytonious/FFMediaToolkit/pull/1. ;-) Thank you!
I have this simple code and makes my app crash. I think it has something to do with the frames allocated memory. How do I handle this correctly, because I cannot dispose a frame?