Closed kskalski closed 3 years ago
I believe I have noticed this happening in my own code as well. It only appears to happen sometimes for me (possible race condition?), and not just with audio either. I think it may have to do with the library attempting to dispose of or destroy memory that it does not own anymore (i.e redundant disposal of media packets). I will investigate this as soon as I can and try to devise a solution once I have a better understanding of the nature of the problem.
I've fixed this bug. The crash was caused by the redundant disposal of the avio
file buffer, which was already released by the avformat_close_input
method call.
I was trying the current develop version (after changes from @yodadude2003) of Audio decoding on mp3 file and it crashes when disposing with
Program „[21944] FFMediaAudio.exe” zakończył działanie z kodem -1073740940 (0xc0000374).
I prepared a sample program that I'm using to read audio: https://github.com/kskalski/snippets/tree/master/FFMediaToolkitTest It seems to crash this way always and on any mp3 file. When using earlier version of library it works fine (the API is also slightly different)