1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-30 07:21:12 +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;