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

pull/2372/head
Andrei Kortunov 6 years ago
parent fae5843347
commit 454bae2c43

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

Loading…
Cancel
Save