summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-03-16 01:51:25 +0100
committerCarl Hetherington <cth@carlh.net>2023-03-16 22:45:19 +0100
commita32ac8ffe3f061cee5396364cf73ce565c130f3a (patch)
tree53ed93ab503666ee080e78c9752b7ea79b0dc039
parent693013b77341e4177c792de091ab9a524e33c477 (diff)
Make it quicker to cancel an analyse subtitle job (#2486).
-rw-r--r--src/lib/analyse_subtitles_job.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/analyse_subtitles_job.cc b/src/lib/analyse_subtitles_job.cc
index b41b65c3b..d8d258ea5 100644
--- a/src/lib/analyse_subtitles_job.cc
+++ b/src/lib/analyse_subtitles_job.cc
@@ -80,7 +80,9 @@ AnalyseSubtitlesJob::run ()
set_progress_unknown ();
if (!content->text.empty()) {
- while (!player->pass ()) {}
+ while (!player->pass ()) {
+ boost::this_thread::interruption_point();
+ }
}
SubtitleAnalysis analysis (_bounding_box, content->text.front()->x_offset(), content->text.front()->y_offset());