Commit 4b22a291 authored by Sam Hocevar's avatar Sam Hocevar

* ./plugins/spudec/spu_decoder.c, ./plugins/dvd/dvd_es.c: temporary fix

    to avoid retrieving the spu palette from a network stream as if it was
    a DVD.
parent a6bccb1c
......@@ -4,6 +4,9 @@
HEAD
* ./plugins/spudec/spu_decoder.c, ./plugins/dvd/dvd_es.c: temporary fix
to avoid retrieving the spu palette from a network stream as if it was
a DVD.
* ./src/interface/main.c: tidied the help output code.
* ALL: removed underscores from option names and made a few options more
self-explanatory, for instance --input_channel becomes --audio-channel;
......
/* dvd_es.c: functions to find and select ES
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_es.c,v 1.7 2002/04/23 14:16:20 sam Exp $
* $Id: dvd_es.c,v 1.8 2002/04/23 20:58:23 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -231,8 +231,10 @@ void DVDReadSPU( input_thread_t * p_input )
{
ADDES( 0xbd, 0x20 + i_id, DVD_SPU_ES, SPU_ES,
vts.manager_inf.p_spu_attr[i-1].i_lang_code,
16*sizeof(u32) );
memcpy( p_es->p_demux_data, palette, 16*sizeof(u32) );
sizeof(int) + 16*sizeof(u32) );
*(int*)p_es->p_demux_data = 0xBeeF;
memcpy( (void*)p_es->p_demux_data + sizeof(int),
palette, 16*sizeof(u32) );
}
else
{
......
......@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: spu_decoder.c,v 1.15 2002/04/18 12:51:59 sam Exp $
* $Id: spu_decoder.c,v 1.16 2002/04/23 20:58:23 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -426,13 +426,15 @@ static int ParseControlSequences( spudec_thread_t *p_spudec,
case SPU_CMD_SET_PALETTE:
/* 03xxxx (palette) */
if( p_spudec->p_config->p_demux_data )
if( p_spudec->p_config->p_demux_data &&
*(int*)p_spudec->p_config->p_demux_data == 0xBeeF )
{
p_spu->p_sys->b_palette = 1;
for( i = 0; i < 4 ; i++ )
{
pi_color = (u8*)p_spudec->p_config->p_demux_data
+ 4 * GetBits( &p_spudec->bit_stream, 4 );
pi_color = (void*)p_spudec->p_config->p_demux_data
+ sizeof(int) + 4 * sizeof(u8) *
GetBits( &p_spudec->bit_stream, 4 );
p_spu->p_sys->pi_yuv[3-i][0] = pi_color[2];
p_spu->p_sys->pi_yuv[3-i][1] = pi_color[0];
p_spu->p_sys->pi_yuv[3-i][2] = pi_color[1];
......
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