[MPlayer-cvslog] r22931 - trunk/libass/ass_render.c

eugeni subversion at mplayerhq.hu
Sat Apr 7 15:32:51 CEST 2007


Author: eugeni
Date: Sat Apr  7 15:32:51 2007
New Revision: 22931

Modified:
   trunk/libass/ass_render.c

Log:
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/



Modified: trunk/libass/ass_render.c
==============================================================================
--- trunk/libass/ass_render.c	(original)
+++ trunk/libass/ass_render.c	Sat Apr  7 15:32:51 2007
@@ -1385,6 +1385,11 @@ static void wrap_lines_smart(int max_tex
 		
 		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;



More information about the MPlayer-cvslog mailing list