* parse.c: SPU parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: parse.c,v 1.15 2003/11/22 23:39:14 fenrir Exp $
+ * $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr>
subpicture_t *p_spu;
/* Allocate the subpicture internal data. */
- p_spu = vout_CreateSubPicture( p_sys->p_vout, MEMORY_SUBPICTURE );
+ p_spu = vout_CreateSubPicture( p_sys->p_vout, SUBT1_CHAN, TEXT_CONTENT,
+ MEMORY_SUBPICTURE );
if( p_spu == NULL )
{
return;
case SPU_CMD_SET_PALETTE:
/* 03xxxx (palette) */
- if( p_dec->p_fifo->p_demux_data
- && *(int*)p_dec->p_fifo->p_demux_data == 0xBeeF )
+ if( p_dec->fmt_in.subs.spu.palette[0] == 0xBeeF )
{
unsigned int idx[4];
for( i = 0; i < 4 ; i++ )
{
- uint32_t i_color;
- i_color = ((uint32_t*)((char*)p_dec->p_fifo->p_demux_data +
- sizeof(int)))[idx[i]];
+ uint32_t i_color = p_dec->fmt_in.subs.spu.palette[1+idx[i]];
/* FIXME: this job should be done sooner */
p_spu->p_sys->pi_yuv[3-i][0] = (i_color>>16) & 0xff;
((p_sys->buffer[i_index+4]>>4)&0x0f);
p_spu->i_height = (((p_sys->buffer[i_index+4]&0x0f)<<8)|
p_sys->buffer[i_index+5]) - p_spu->i_y + 1;
-
+
i_index += 6;
break;
break;
default: /* xx (unknown command) */
- msg_Err( p_dec, "unknown command 0x%.2x", i_command );
+ msg_Warn( p_dec, "unknown command 0x%.2x", i_command );
return VLC_EGENERIC;
}