Fix race between the Butler thread starting and audio (perhaps) being disabled.
authorCarl Hetherington <cth@carlh.net>
Thu, 26 May 2022 18:04:33 +0000 (20:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 26 May 2022 18:04:33 +0000 (20:04 +0200)
commit8987f133295e352c44e05ef338eacc801c61a629
tree6325c00b2c1097bb483568ddad8b545e0e40f717
parentb6fb82e5df5551497b823f20a75c7ff94ffd1b3e
Fix race between the Butler thread starting and audio (perhaps) being disabled.

This could cause Butler::audio to be called with _audio_channels = 0
and _disable_audio = false, causing an exception in AudioBuffers when
remap() tried to make an AudioBuffers object with a channel count of 0.
src/lib/butler.cc
src/lib/butler.h
src/lib/ffmpeg_encoder.cc
src/wx/film_viewer.cc
test/butler_test.cc
test/dcp_playback_test.cc
test/player_test.cc
test/threed_test.cc