HEAD
- * Added gnome.h check and cleaned the error messages in the configure script
+ * Fixed a packet leak in DemuxPSI.
+ * Added gnome.h check and cleaned the error messages in the configure script.
* Tiny small optim in LPCM decoder.
0.2.83
* input_ts.c: TS demux and netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ts.c,v 1.32 2001/08/27 16:13:20 massiot Exp $
+ * $Id: input_ts.c,v 1.33 2001/09/06 18:21:02 henri Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
struct iovec * p_iovec;
struct timeval timeout;
- /* Get iovecs */
- p_iovec = input_NetlistGetiovec( p_input->p_method_data );
-
- if ( p_iovec == NULL )
- {
- return( -1 ); /* empty netlist */
- }
-
/* Init */
p_method = ( thread_ts_data_t * )p_input->p_plugin_data;
intf_ErrMsg( "input error: TS select error (%s)", strerror(errno) );
return( -1 );
}
-
+
if( i_data )
{
+ /* Get iovecs */
+ p_iovec = input_NetlistGetiovec( p_input->p_method_data );
+
+ if ( p_iovec == NULL )
+ {
+ return( -1 ); /* empty netlist */
+ }
+
#if defined( WIN32 )
if( p_input->stream.b_pace_control )
{
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.41 2001/07/30 00:53:05 sam Exp $
+ * $Id: input_netlist.c,v 1.42 2001/09/06 18:21:02 henri Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
( (p_netlist->i_data_end - p_netlist->i_data_start + p_netlist->i_nb_data)
& ( p_netlist->i_nb_data -1 ) ) < p_netlist->i_read_once )
{
- intf_ErrMsg("Empty iovec FIFO. Unable to allocate memory");
+ intf_ErrMsg("Empty iovec FIFO.");
return (NULL);
}
/* check */
if ( p_netlist->i_data_start == p_netlist->i_data_end )
{
- intf_ErrMsg("Empty Data FIFO in netlist. Unable to allocate memory");
+ intf_ErrMsg("Empty Data FIFO in netlist.");
return ( NULL );
}
/* check */
if ( p_netlist->i_pes_start == p_netlist->i_pes_end )
{
- intf_ErrMsg("Empty PES FIFO in netlist - Unable to allocate memory");
+ intf_ErrMsg("Empty PES FIFO in netlist");
return ( NULL );
}
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.56 2001/07/18 15:21:51 massiot Exp $
+ * $Id: mpeg_system.c,v 1.57 2001/09/06 18:21:02 henri Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
{
/* This was the last section of PSI */
p_psi->b_is_complete = 1;
+
+ switch( p_demux_data->i_psi_type)
+ {
+ case PSI_IS_PAT:
+ input_DecodePAT( p_input, p_es );
+ break;
+ case PSI_IS_PMT:
+ input_DecodePMT( p_input, p_es );
+ break;
+ default:
+ intf_WarnMsg(2, "Received unknown PSI in demuxPSI");
+ }
}
}
else
}
}
- if ( p_psi->b_is_complete )
- {
- switch( p_demux_data->i_psi_type)
- {
- case PSI_IS_PAT:
- input_DecodePAT( p_input, p_es );
- break;
- case PSI_IS_PMT:
- input_DecodePMT( p_input, p_es );
- break;
- default:
- intf_WarnMsg(2, "Received unknown PSI in demuxPSI");
- }
- }
#undef p_psi
#undef p
+
+ p_input->pf_delete_packet( p_input->p_method_data, p_data );
return ;
}