Commit 1f8a2e2d authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

vobsub: strdup memleak (stream_Add copies the format)

(cherry picked from commit f8bc9414)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent b58180b2
......@@ -537,7 +537,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
}
else if( !strncmp( "id:", line, 3 ) )
{
char language[20];
char language[3];
int i_track_id;
es_format_t fmt;
......@@ -547,6 +547,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
{
p_sys->i_tracks++;
p_sys->track = realloc( p_sys->track, sizeof( vobsub_track_t ) * (p_sys->i_tracks + 1 ) );
language[2] = '\0';
/* Init the track */
current_tk = &p_sys->track[p_sys->i_tracks - 1];
......@@ -560,7 +561,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
fmt.subs.spu.i_original_frame_width = p_sys->i_original_frame_width;
fmt.subs.spu.i_original_frame_height = p_sys->i_original_frame_height;
fmt.psz_language = strdup( language );
fmt.psz_language = language;
if( p_sys->b_palette )
{
fmt.subs.spu.palette[0] = 0xBeef;
......
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