Make it quicker to cancel an analyse subtitle job (#2486).
authorCarl Hetherington <cth@carlh.net>
Thu, 16 Mar 2023 00:51:25 +0000 (01:51 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 16 Mar 2023 21:45:19 +0000 (22:45 +0100)
src/lib/analyse_subtitles_job.cc

index b41b65c3ba2872dfdd39290b2671b59bc64eb9ee..d8d258ea54962af1d86c198242302690744feecb 100644 (file)
@@ -80,7 +80,9 @@ AnalyseSubtitlesJob::run ()
        set_progress_unknown ();
 
        if (!content->text.empty()) {
        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());
        }
 
        SubtitleAnalysis analysis (_bounding_box, content->text.front()->x_offset(), content->text.front()->y_offset());