1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 08:49:40 +00:00

Make PacketQueue fields atomic to avoid data races (e.g. with ParseThread)

This commit is contained in:
Andrei Kortunov 2019-05-10 14:22:52 +04:00
parent fae5843347
commit 454bae2c43

View file

@ -80,8 +80,8 @@ struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
std::atomic<bool> flushing;
int nb_packets;
int size;
std::atomic<int> nb_packets;
std::atomic<int> size;
OpenThreads::Mutex mutex;
OpenThreads::Condition cond;