From: Carl Hetherington Date: Thu, 16 Mar 2023 00:51:25 +0000 (+0100) Subject: Make it quicker to cancel an analyse subtitle job (#2486). X-Git-Tag: v2.16.48~4 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=a32ac8ffe3f061cee5396364cf73ce565c130f3a;ds=sidebyside Make it quicker to cancel an analyse subtitle job (#2486). --- 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());