1
Fork 0

audioconvert: avoid bitfield data races

Move the driver and warned bits after the int field in the struct so
that they are placed in separate memory.

Otherwise, a write from the data thread might race with a write from the
main thread and leave the bits in the wrong state.
This commit is contained in:
Wim Taymans 2023-12-13 12:10:18 +01:00
parent 32ee81d977
commit 41e88b1267
1 changed files with 3 additions and 2 deletions

View File

@ -89,13 +89,14 @@ struct impl {
unsigned int add_listener:1;
unsigned int have_format:1;
unsigned int started:1;
unsigned int warned:1;
unsigned int ready:1;
unsigned int driver:1;
unsigned int async:1;
unsigned int passthrough:1;
unsigned int follower_removing:1;
unsigned int in_recalc;
unsigned int warned:1;
unsigned int driver:1;
};
/** \endcond */