/*****************************************************************************
* ps.c : Program Stream input module for vlc
*****************************************************************************
- * Copyright (C) 2000-2001 VideoLAN
- * $Id: ps.c,v 1.10 2003/09/07 22:48:29 fenrir Exp $
+ * Copyright (C) 2000-2004, 2004 VideoLAN
+ * $Id: ps.c,v 1.17 2004/01/25 20:05:28 hartman Exp $
*
- * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ * Author: Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
-#include <string.h> /* strdup() */
#include <vlc/vlc.h>
#include <vlc/input.h>
return -1;
}
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
-
- p_input->stream.p_selected_program =
+
+ p_input->stream.p_selected_program =
p_input->stream.pp_programs[0] ;
-
+
if( p_input->stream.b_seekable )
{
stream_ps_data_t * p_demux_data =
(stream_ps_data_t *)p_input->stream.pp_programs[0]->p_demux_data;
+ off_t i_tell = p_input->stream.p_selected_area->i_tell;
+
/* Pre-parse the stream to gather stream_descriptor_t. */
+ p_input->pf_seek( p_input, (off_t) 0 );
p_input->stream.pp_programs[0]->b_is_ok = 0;
p_demux_data->i_PSM_version = EMPTY_PSM_VERSION;
}
}
input_AccessReinit( p_input );
- p_input->pf_seek( p_input, (off_t)0 );
+ p_input->pf_seek( p_input, i_tell );
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_demux_data->b_has_PSM )
}
break;
+ case VLC_FOURCC('o','g','t',' '):
+ if( config_GetInt( p_input, "spu-channel" )
+ == (p_es->i_id & 0x0003) )
+ {
+ input_SelectES( p_input, p_es );
+ }
+ break;
+
case VLC_FOURCC('l','p','c','m'):
case VLC_FOURCC('l','p','c','b'):
if( config_GetInt( p_input, "audio-channel" )