Just having no specified lines value does not mean we definitely need place the subti...
authorCarl Hetherington <cth@carlh.net>
Sun, 16 Feb 2020 19:39:47 +0000 (20:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 16 Feb 2020 19:39:47 +0000 (20:39 +0100)
src/lib/text_decoder.cc

index 313fbaa5c669ee3328768257d805525c9d2de20e..28dace7afbcf656c8827e3382d8f732fe4c6e65d 100644 (file)
@@ -106,9 +106,8 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
        bool needs_placement = false;
        optional<int> bottom_line;
        BOOST_FOREACH (sub::Line i, subtitle.lines) {
-               if (!i.vertical_position.reference || !i.vertical_position.lines || i.vertical_position.reference.get() == sub::TOP_OF_SUBTITLE) {
+               if (!i.vertical_position.reference || (i.vertical_position.line && !i.vertical_position.lines) || i.vertical_position.reference.get() == sub::TOP_OF_SUBTITLE) {
                        needs_placement = true;
-                       DCPOMATIC_ASSERT (i.vertical_position.line);
                        if (!bottom_line || bottom_line.get() < i.vertical_position.line.get()) {
                                bottom_line = i.vertical_position.line.get();
                        }