summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-10 15:40:07 +0200
committerCarl Hetherington <cth@carlh.net>2022-09-10 23:20:52 +0200
commitc2febf6895f80b2d75cceb01bf0f9b0970c1b7d5 (patch)
treea3bf7f3bbe19b0a4800f4f59a031a09d9f025b21
parentd41c3bb9ebfb450316e6c79fdf0281ac2e155aa1 (diff)
Use atomic for _always_burn_open_subtitles.
-rw-r--r--src/lib/player.cc3
-rw-r--r--src/lib/player.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 05e47b149..eb92bbab1 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -102,6 +102,7 @@ Player::Player (shared_ptr<const Film> film, Image::Alignment subtitle_alignment
, _ignore_video(false)
, _ignore_audio(false)
, _ignore_text(false)
+ , _always_burn_open_subtitles(false)
, _tolerant (film->tolerant())
, _audio_merger (_film->audio_frame_rate())
, _subtitle_alignment (subtitle_alignment)
@@ -117,6 +118,7 @@ Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist
, _ignore_video(false)
, _ignore_audio(false)
, _ignore_text(false)
+ , _always_burn_open_subtitles(false)
, _tolerant (film->tolerant())
, _audio_merger (_film->audio_frame_rate())
{
@@ -529,7 +531,6 @@ Player::set_ignore_text ()
void
Player::set_always_burn_open_subtitles ()
{
- boost::mutex::scoped_lock lm (_mutex);
_always_burn_open_subtitles = true;
}
diff --git a/src/lib/player.h b/src/lib/player.h
index 18be9d40c..bbc49c738 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -182,7 +182,7 @@ private:
boost::atomic<bool> _ignore_audio;
/** true if the player should ignore all text; i.e. never produce any */
boost::atomic<bool> _ignore_text;
- bool _always_burn_open_subtitles = false;
+ boost::atomic<bool> _always_burn_open_subtitles;
/** true if we should try to be fast rather than high quality */
bool _fast = false;
/** true if we should keep going in the face of `survivable' errors */