Closed Reimnop closed 3 years ago
I'm having this problem aswell, and I've managed to narrowed it down to FFDictionary dispose method, especifacally when it calls:
ffmpeg.av_dict_free(&ptr);
To reproduce it, I've been creating new MediaFile on a loop (not parallel, just a good old for) and trying to extract a frame, on the same video file.
I also have the same issue. We could reproduce the issue in .NET core 3.1
var videoFile = MediaFile.Open(moviePath); ImageData data1 = videoFile.Video.ReadFrame(new TimeSpan(0, 0, 0, 0, 15)); videoFile.Dispose();
The Dispose() method is crashing some times.
Not sure if that is really related, but I think there is a bug in FFDictinoary Dispose method, which I fixed here https://github.com/radek-k/FFMediaToolkit/pull/46
I'm using .NET Core 3.1. App runs fine if the crash doesn't happen. It seems to happen randomly. Code: