* mpeg_ps.c : Program Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: mpeg_ps.c,v 1.5 2002/03/04 23:56:37 massiot Exp $
+ * $Id: mpeg_ps.c,v 1.8 2002/03/18 19:14:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if( *p_peek || *(p_peek + 1) || *(p_peek + 2) != 1 )
{
- if( p_input->psz_demux && strncmp( p_input->psz_demux, "ps", 3 ) )
+ if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) )
{
/* User forced */
- intf_ErrMsg( "input error: this doesn't seem like an MPEG stream, continuing" );
+ intf_ErrMsg( "input error: this doesn't look like an MPEG PS stream, continuing" );
}
else
{
}
else if( *(p_peek + 3) <= 0xb9 )
{
- if( p_input->psz_demux && strncmp( p_input->psz_demux, "ps", 3 ) )
+ if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this seems to be an elementary stream (ES plug-in ?),");
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
- if( config_GetIntVariable( INPUT_CHANNEL_VAR )
+ if( config_GetIntVariable( "input_channel" )
== (p_es->i_id & 0x1F) ||
- ( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
+ ( config_GetIntVariable( "input_channel" ) < 0
&& !(p_es->i_id & 0x1F) ) )
- switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
+ switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_MPEG:
break;
case AC3_AUDIO_ES:
- if( config_GetIntVariable( INPUT_CHANNEL_VAR )
+ if( config_GetIntVariable( "input_channel" )
== ((p_es->i_id & 0xF00) >> 8) ||
- ( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
+ ( config_GetIntVariable( "input_channel" ) < 0
&& !((p_es->i_id & 0xF00) >> 8) ) )
- switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
+ switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_AC3:
break;
case DVD_SPU_ES:
- if( config_GetIntVariable( INPUT_SUBTITLE_VAR )
+ if( config_GetIntVariable( "input_subtitle" )
== ((p_es->i_id & 0x1F00) >> 8) )
{
input_SelectES( p_input, p_es );
break;
case LPCM_AUDIO_ES:
- if( config_GetIntVariable( INPUT_CHANNEL_VAR )
+ if( config_GetIntVariable( "input_channel" )
== ((p_es->i_id & 0x1F00) >> 8) ||
- ( config_GetIntVariable( INPUT_CHANNEL_VAR ) < 0
+ ( config_GetIntVariable( "input_channel" ) < 0
&& !((p_es->i_id & 0x1F00) >> 8) ) )
- switch( config_GetIntVariable( INPUT_AUDIO_VAR ) )
+ switch( config_GetIntVariable( "input_audio" ) )
{
case -1:
case REQUESTED_LPCM: