[vlc-devel] [Bug] vlc crash at start play any video (error in file modules/misc/freetype.c)
Savin Alex
alexo.veto at gmail.com
Fri Nov 6 18:36:27 CET 2009
I try to debug vlc and found:
it crash at line (in file: modules/misc/freetype.c):
fmt.p_palette->i_entries = 16;
fmt.p_palette have zero value,
and when i look at code(see below), i not see where fmt.p_palette is
initialized.
(more detail see at http://forum.videolan.org/viewtopic.php?f=13&t=65128 )
====================================================
static int Render( filter_t *p_filter, subpicture_region_t *p_region,
line_desc_t *p_line, int i_width, int i_height )
{
static const uint8_t pi_gamma[16] =
{0x00, 0x52, 0x84, 0x96, 0xb8, 0xca, 0xdc, 0xee, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
uint8_t *p_dst;
video_format_t fmt;
int i, x, y, i_pitch;
uint8_t i_y; /* YUV values, derived from incoming RGB */
int8_t i_u, i_v;
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
fmt.i_aspect = 0;
fmt.i_width = fmt.i_visible_width = i_width + 4;
fmt.i_height = fmt.i_visible_height = i_height + 4;
if( p_region->fmt.i_visible_width > 0 )
fmt.i_visible_width = p_region->fmt.i_visible_width;
if( p_region->fmt.i_visible_height > 0 )
fmt.i_visible_height = p_region->fmt.i_visible_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
assert( !p_region->p_picture );
p_region->p_picture = picture_New( fmt.i_chroma, fmt.i_width,
fmt.i_height, fmt.i_aspect );
if( !p_region->p_picture )
return VLC_EGENERIC;
p_region->fmt = fmt;
/* Calculate text color components */
i_y = (uint8_t)(( 66 * p_line->i_red + 129 * p_line->i_green +
25 * p_line->i_blue + 128) >> 8) + 16;
i_u = (int8_t)(( -38 * p_line->i_red - 74 * p_line->i_green +
112 * p_line->i_blue + 128) >> 8) + 128;
i_v = (int8_t)(( 112 * p_line->i_red - 94 * p_line->i_green -
18 * p_line->i_blue + 128) >> 8) + 128;
/* Build palette */
fmt.p_palette->i_entries = 16;
More information about the vlc-devel
mailing list