ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
210 stars 53 forks source link

Lock all access to TexturePool #333

Closed lukasf closed 1 year ago

lukasf commented 1 year ago

We only used the samplesMutex lock in places where trackedSamples list was accessed. But in Sample::OnProcessed, we also access the TexturePool from a different thread. This lead to occasional crashes, because the TexturePool is not inherently threadsafe. So I extended the locks to also cover all TexturePool access.

This should fix the crash seen in #320.