[MPlayer-dev-eng] [PATCH] libass - hard line breaks sometimes ignored

Jindrich Makovicka makovick at gmail.com
Sat Apr 7 12:22:28 CEST 2007


Hi,

the current word wrapping code in libass has a problem with the
situation when the word followed by a hard line
break overflows. In that case, the wrapper notices that it has to
insert the soft break before the word, but it forgets about the hard
break after it. This results in the words originally split by the
line break to be joined on one line.

The attached patch fixes the issue by repeating the loop when there was
a soft linebreak inserted and the current symbol is a newline.

The bug can be triggered by the following subtitle and options on a
496x384 video.

{1}{15905}bologna indeed were a side|intellectually out-argued

vo=gl:yuv=3:lscale=1:rectangle=1:swapinterval=1:slice-height=0:osdcolor=0xffff60
subcp="enca:cs:cp1250"
ffactor=1
fontconfig=1
font="DejaVu Sans"
subfont-text-scale=5.5
subfont-osd-scale=7
slang=cz
sub-fuzziness=2
spuaa=4
monitoraspect=16:10
ass=1
ass-font-scale=1.2
ass-use-margins=1
ass-color=ffff6000

Screenshot is available here:

http://kmlinux.fjfi.cvut.cz/~makovick/wrap.png

-- 
Jindrich Makovicka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hardbreak.diff
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070407/f51e69b7/attachment.bin>


More information about the MPlayer-dev-eng mailing list