Another macOS std::list boost::thread SNAFU.
[dcpomatic.git] / src / lib / render_text.cc
index d2631e3407808ed7f1c186f0011823fc5b92b317..8b9d93423d390062e53b710fba9feaf06b098a92 100644 (file)
@@ -46,6 +46,7 @@ using std::make_pair;
 using boost::shared_ptr;
 using boost::optional;
 using boost::algorithm::replace_all;
+using namespace dcpomatic;
 
 static FcConfig* fc_config = 0;
 static list<pair<boost::filesystem::path, string> > fc_config_fonts;
@@ -350,7 +351,7 @@ render_text (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Siz
        list<PositionImage> images;
 
        BOOST_FOREACH (StringText const & i, subtitles) {
-               if (!pending.empty() && fabs (i.v_position() - pending.back().v_position()) > 1e-4) {
+               if (!pending.empty() && (i.v_align() != pending.back().v_align() || fabs(i.v_position() - pending.back().v_position()) > 1e-4)) {
                        images.push_back (render_line (pending, fonts, target, time, frame_rate));
                        pending.clear ();
                }