Commit a99b43de authored by Alexis Ballier's avatar Alexis Ballier Committed by Jean-Baptiste Kempf

Fix segfault when freetype-yuvp is set to 1 in vlcrc.

Allocate a palette for the format/region and reuse it. subpicture_region_Delete should take care of freeing it, but please someone double checks this to be sure.

Reported by: Alexander Stein
References: https://bugs.gentoo.org/show_bug.cgi?id=300406
parent a4e4c285
......@@ -638,6 +638,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
p_region->p_picture = picture_NewFromFormat( &fmt );
if( !p_region->p_picture )
return VLC_EGENERIC;
fmt.p_palette = p_region->fmt.p_palette ? p_region->fmt.p_palette : malloc(sizeof(*fmt.p_palette));
p_region->fmt = fmt;
/* Calculate text color components */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment