[MPlayer-dev-eng] [PATCH] libass BorderStyle==3 fix

Rinat ibragimovrinat at mail.ru
Fri Jun 5 17:12:48 CEST 2009


> > Unfortunally this patch adding a bug. Sometimes, at mplayer closure it says
> > something like
> > *** glibc detected *** /usr/bin/mplayer: free(): invalid next size (normal)
> > : 0x0a46f230 ***
> >
> > Can anyone help me fix this bug?
> 
> Bad news, I can't reproduce it, the patch works fine for me. Try running it 
> under valgrind. Or send me a subtitle file it crashes on.
> 

attached file crashes patched mplayer in 2 seconds. Valgrind says something about
invalid read. 

> > +	double outline; //outline width
> 
> It's better to add "int border_style" instead. This way you will avoid 
> comparing floating point values for equality :)

I've added 'outline' in same way as 'shadow' (already in code). It's double
also, and compared to integer in 'render_text'.

> And please move that large chunk of code into a separate function, like 
> get_opaque_box(int width, int height).

I'll fix it later. After preventing crash.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ass
Type: application/octet-stream
Size: 16137 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090605/5ba1fd0e/attachment.obj>


More information about the MPlayer-dev-eng mailing list