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

Evgeniy Stepanov eugeni.stepanov at gmail.com
Wed Jun 3 19:14:07 CEST 2009


On Tuesday 02 June 2009 21:39:57 Rinat wrote:
> I've changed code a bit. Now glyph_info_t have 'outline' property which is
> checked in render_text when rendering outline. 'border' and 'shadow' are
> now set to 0 unless BorderStyle==1 specified.
> I've added background bitmap to bitmap cache with ch==0 in key. Width and
> height of bitmap are stored in scale_x and scale_y fields of key.
>
> 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.

> +	double outline; //outline width

It's better to add "int border_style" instead. This way you will avoid 
comparing floating point values for equality :)

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



More information about the MPlayer-dev-eng mailing list