summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-07 13:32:51 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-07 13:32:51 +0000
commit79e828c998e7a3121c563fc95c461f61b8047e0c (patch)
treeb08d32653d05204c52b888285e03ab10c99eece6 /libass
parent23ce10ce355053cfa60a6c89c35f3a8d6e619fe8 (diff)
downloadmpv-79e828c998e7a3121c563fc95c461f61b8047e0c.tar.bz2
mpv-79e828c998e7a3121c563fc95c461f61b8047e0c.tar.xz
Fix lost hard linebreaks in libass by repeating the loop when both soft and
hard linebreaks are about to be added. Original message: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-April/050876.html Patch by Jindrich Makovicka /makovick gmail com/ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22931 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 4532cab971..a757c2d4da 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1385,6 +1385,11 @@ static void wrap_lines_smart(int max_text_width)
if (cur->symbol == ' ')
last_space = i;
+
+ // make sure the hard linebreak is not forgotten when
+ // there was a new soft linebreak just inserted
+ if (cur->symbol == '\n' && break_type == 1)
+ i--;
}
#define DIFF(x,y) (((x) < (y)) ? (y - x) : (x - y))
exit = 0;