Commit ba97736a authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/codec/spudec/*: split spudec into the parsing and the rendering

    functions.
  * ./modules/demux/mpeg/audio.c: at least three PS startcodes are required
    before we abort the parsing and consider the input as PS instead of MP3.
parent 647a105d
spudec_SOURCES = spudec.c
spudec_SOURCES = spudec.c parse.c render.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* spudec.h : sub picture unit decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: spudec.h,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: spudec.h,v 1.2 2002/08/16 03:07:56 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -81,24 +81,12 @@ typedef struct spudec_thread_t
#define SPU_CMD_SET_OFFSETS 0x06
#define SPU_CMD_END 0xff
/*****************************************************************************
* AddNibble: read a nibble from a source packet and add it to our integer.
*****************************************************************************/
static inline unsigned int AddNibble( unsigned int i_code,
u8 *p_src, int *pi_index )
{
if( *pi_index & 0x1 )
{
return( i_code << 4 | ( p_src[(*pi_index)++ >> 1] & 0xf ) );
}
else
{
return( i_code << 4 | p_src[(*pi_index)++ >> 1] >> 4 );
}
}
/*****************************************************************************
* Prototypes
*****************************************************************************/
vlc_thread_t spudec_CreateThread( decoder_fifo_t * p_fifo );
int E_(SyncPacket) ( spudec_thread_t * );
void E_(ParsePacket) ( spudec_thread_t * );
void E_(RenderSPU) ( vout_thread_t *, picture_t *,
const subpicture_t * );
......@@ -2,7 +2,7 @@
* audio.c : mpeg audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: audio.c,v 1.4 2002/08/13 20:28:56 fenrir Exp $
* $Id: audio.c,v 1.5 2002/08/16 03:07:56 sam Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -477,7 +477,7 @@ static int SkipID3Tag( input_thread_t *p_input )
i_size += 10;
}
i_size += 10;
msg_Dbg( p_input, "ID3 tag found, skiping %d bytes", i_size );
msg_Dbg( p_input, "ID3 tag found, skipping %d bytes", i_size );
if ( input_Peek( p_input, &p_peek, i_size ) < i_size )
{
msg_Err( p_input, "cannot peek()" );
......@@ -497,20 +497,22 @@ static int SkipID3Tag( input_thread_t *p_input )
static int CheckPS( input_thread_t *p_input )
{
u8 *p_peek;
int i_startcode = 0;
int i_size = input_Peek( p_input, &p_peek, 8196 );
while( i_size > 4 )
{
if( ( p_peek[0] == 0 ) && ( p_peek[1] == 0 )&&
( p_peek[2] == 1 ) && ( p_peek[3] >= 0xb9 ) )
if( ( p_peek[0] == 0 ) && ( p_peek[1] == 0 ) &&
( p_peek[2] == 1 ) && ( p_peek[3] >= 0xb9 ) &&
++i_startcode >= 3 )
{
return( 1 ); /* it could be ps so ...*/
return 1;
}
p_peek++;
i_size--;
}
return( 0 );
return 0;
}
/*****************************************************************************
......
......@@ -117,7 +117,7 @@ void KInterface::initActions()
next->setStatusText( i18n( "Next" ) );
// use the absolute path to your ktestui.rc file for testing purpose in createGUI();
createGUI("plugins/kde/ui.rc");
createGUI("modules/gui/kde/ui.rc");
}
void KInterface::initStatusBar()
......
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