Commit b7b77018 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

vlc_es: use a common define for the initialized SPU palette

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9587e7c0
......@@ -534,6 +534,8 @@ struct subs_format_t
text_style_t *p_style; /* Default styles to use */
};
#define SPU_PALETTE_DEFINED 0xbeefbeef
/**
* ES language definition
*/
......
......@@ -1503,7 +1503,7 @@ static void ESNew( demux_t *p_demux, int i_id )
}
/* Palette */
tk->fmt.subs.spu.palette[0] = 0xBeef;
tk->fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
memcpy( &tk->fmt.subs.spu.palette[1], p_sys->clut,
16 * sizeof( uint32_t ) );
......
......@@ -706,7 +706,7 @@ static void ESNew( demux_t *p_demux, int i_id, int i_lang )
else if( tk->fmt.i_cat == SPU_ES )
{
/* Palette */
tk->fmt.subs.spu.palette[0] = 0xBeef;
tk->fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
memcpy( &tk->fmt.subs.spu.palette[1], p_sys->clut,
16 * sizeof( uint32_t ) );
......
......@@ -264,7 +264,7 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
return VLC_EGENERIC;
}
if( p_dec->fmt_in.subs.spu.palette[0] == 0xBeeF )
if( p_dec->fmt_in.subs.spu.palette[0] == SPU_PALETTE_DEFINED )
{
unsigned int idx[4];
int i;
......
......@@ -486,7 +486,7 @@ int OpenDemux( vlc_object_t *p_this )
if( psz_start &&
vobsub_palette_parse( psz_start, &es_fmt.subs.spu.palette[1] ) == VLC_SUCCESS )
{
es_fmt.subs.spu.palette[0] = 0xBeef;
es_fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
msg_Dbg( p_demux, "vobsub palette read" );
}
else
......
......@@ -1890,7 +1890,7 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
if( psz_start &&
vobsub_palette_parse( psz_start, &p_tk->fmt.subs.spu.palette[1] ) == VLC_SUCCESS )
{
p_tk->fmt.subs.spu.palette[0] = 0xBeef;
p_tk->fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
msg_Dbg( vars.p_demuxer, "vobsub palette read" );
}
else
......
......@@ -167,7 +167,7 @@ static void SetupESDS( demux_t *p_demux, mp4_track_t *p_track, const MP4_descrip
p_track->fmt.subs.spu.palette[1 + i] =
GetDWBE((char*)p_track->fmt.p_extra + i * 4);
}
p_track->fmt.subs.spu.palette[0] = 0xBeef;
p_track->fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
}
}
......
......@@ -558,7 +558,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
fmt.psz_language = language;
if( p_sys->b_palette )
{
fmt.subs.spu.palette[0] = 0xBeef;
fmt.subs.spu.palette[0] = SPU_PALETTE_DEFINED;
memcpy( &fmt.subs.spu.palette[1], p_sys->palette, 16 * sizeof( uint32_t ) );
}
......
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