summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-10 15:41:14 +0200
committerCarl Hetherington <cth@carlh.net>2022-09-10 23:20:54 +0200
commitde522946acfd022b5084434fbcfd225499a17293 (patch)
treeafabb693bddbc97c69689601bf9612805e85b5eb /src
parentc2febf6895f80b2d75cceb01bf0f9b0970c1b7d5 (diff)
Use atomic for _fast.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc5
-rw-r--r--src/lib/player.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index eb92bbab1..6361d7b2a 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -103,6 +103,7 @@ Player::Player (shared_ptr<const Film> film, Image::Alignment subtitle_alignment
, _ignore_audio(false)
, _ignore_text(false)
, _always_burn_open_subtitles(false)
+ , _fast(false)
, _tolerant (film->tolerant())
, _audio_merger (_film->audio_frame_rate())
, _subtitle_alignment (subtitle_alignment)
@@ -119,6 +120,7 @@ Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist
, _ignore_audio(false)
, _ignore_text(false)
, _always_burn_open_subtitles(false)
+ , _fast(false)
, _tolerant (film->tolerant())
, _audio_merger (_film->audio_frame_rate())
{
@@ -539,9 +541,8 @@ Player::set_always_burn_open_subtitles ()
void
Player::set_fast ()
{
- boost::mutex::scoped_lock lm (_mutex);
_fast = true;
- setup_pieces_unlocked ();
+ setup_pieces();
}
diff --git a/src/lib/player.h b/src/lib/player.h
index bbc49c738..d16666bc5 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -184,7 +184,7 @@ private:
boost::atomic<bool> _ignore_text;
boost::atomic<bool> _always_burn_open_subtitles;
/** true if we should try to be fast rather than high quality */
- bool _fast = false;
+ boost::atomic<bool> _fast;
/** true if we should keep going in the face of `survivable' errors */
bool const _tolerant;
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */