[vlc-devel] commit: Fix segfault when freetype-yuvp is set to 1 in vlcrc. ( Alexis Ballier )
git version control
git at videolan.org
Mon Jan 25 22:53:47 CET 2010
vlc | branch: master | Alexis Ballier <aballier at gentoo.org> | Mon Jan 25 22:42:31 2010 +0100| [a99b43de32abc4aa1d9cf9e046b6ba6753dd2fc1] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a99b43de32abc4aa1d9cf9e046b6ba6753dd2fc1
---
modules/misc/freetype.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index c448b1b..eecf373 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -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 */
More information about the vlc-devel
mailing list