From c2febf6895f80b2d75cceb01bf0f9b0970c1b7d5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 10 Sep 2022 15:40:07 +0200 Subject: [PATCH] Use atomic for _always_burn_open_subtitles. --- src/lib/player.cc | 3 ++- src/lib/player.h | 2 +- 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 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 film, shared_ptr 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 _ignore_audio; /** true if the player should ignore all text; i.e. never produce any */ boost::atomic _ignore_text; - bool _always_burn_open_subtitles = false; + boost::atomic _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 */ -- 2.30.2