Commit b6fde88e authored by Gildas Bazin's avatar Gildas Bazin

* include/charset.h: added "extern "C" {" for c++ modules.
* modules/mux/mp4.c, modules/demux/ts.c: fixed memleaks.
parent dbde1f5f
......@@ -2,7 +2,7 @@
* charset.h: Determine a canonical name for the current locale's character encoding.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: charset.h,v 1.2 2004/01/25 18:17:08 zorglub Exp $
* $Id: charset.h,v 1.3 2004/02/21 23:15:52 gbazin Exp $
*
* Author: Derk-Jan Hartman <thedj at users.sourceforge.net>
*
......@@ -21,4 +21,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
# ifdef __cplusplus
extern "C" {
# endif
VLC_EXPORT( vlc_bool_t, vlc_current_charset, ( char ** ) );
# ifdef __cplusplus
}
# endif
......@@ -2,7 +2,7 @@
* ts.c: Transport Stream input module for VLC.
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id: ts.c,v 1.11 2004/02/14 01:53:17 gbazin Exp $
* $Id: ts.c,v 1.12 2004/02/21 23:15:52 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -60,8 +60,8 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
vlc_module_begin();
set_description( _("ISO 13818-1 MPEG Transport Stream input - new" ) );
......@@ -528,10 +528,10 @@ static void Close( vlc_object_t *p_this )
csa_Delete( p_sys->csa );
}
if( p_sys->i_pmt ) free( p_sys->pmt );
free( p_sys );
}
/*****************************************************************************
* Demux:
*****************************************************************************/
......@@ -1761,13 +1761,15 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
msg_Dbg( p_demux, "PATCallBack called" );
if( pat->psi->i_version != -1 && ( !p_pat->b_current_next || p_pat->i_version == pat->psi->i_version ) )
if( pat->psi->i_version != -1 &&
( !p_pat->b_current_next || p_pat->i_version == pat->psi->i_version ) )
{
dvbpsi_DeletePAT( p_pat );
return;
}
msg_Dbg( p_demux, "new PAT ts_id=0x%x version=%d current_next=%d", p_pat->i_ts_id, p_pat->i_version, p_pat->b_current_next );
msg_Dbg( p_demux, "new PAT ts_id=0x%x version=%d current_next=%d",
p_pat->i_ts_id, p_pat->i_version, p_pat->b_current_next );
/* Clean old */
for( i = 2; i < 8192; i++ )
......@@ -1784,7 +1786,8 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
TAB_REMOVE( p_sys->i_pmt, p_sys->pmt, pid );
}
}
else if( pid->p_owner && pid->p_owner->i_number != 0 && pid->es->id )
else if( pid->p_owner && pid->p_owner->i_number != 0 &&
pid->es->id )
{
/* We only remove es that aren't defined by extra pmt */
PIDClean( p_demux->out, pid );
......@@ -1793,15 +1796,19 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
}
/* now create programs */
for( p_program = p_pat->p_first_program; p_program != NULL; p_program = p_program->p_next )
for( p_program = p_pat->p_first_program; p_program != NULL;
p_program = p_program->p_next )
{
msg_Dbg( p_demux, " * number=%d pid=0x%x", p_program->i_number, p_program->i_pid );
msg_Dbg( p_demux, " * number=%d pid=0x%x", p_program->i_number,
p_program->i_pid );
if( p_program->i_number != 0 )
{
ts_pid_t *pmt = &p_sys->pid[p_program->i_pid];
PIDInit( pmt, VLC_TRUE, pat->psi );
pmt->psi->handle = dvbpsi_AttachPMT( p_program->i_number, (dvbpsi_pmt_callback)PMTCallBack, p_demux );
pmt->psi->handle =
dvbpsi_AttachPMT( p_program->i_number,
(dvbpsi_pmt_callback)PMTCallBack, p_demux );
pmt->psi->i_number = p_program->i_number;
TAB_APPEND( p_sys->i_pmt, p_sys->pmt, pmt );
......@@ -1811,4 +1818,3 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
dvbpsi_DeletePAT( p_pat );
}
......@@ -2,7 +2,7 @@
* mp4.c: mp4/mov muxer
*****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN
* $Id: mp4.c,v 1.14 2004/01/26 18:30:01 gbazin Exp $
* $Id: mp4.c,v 1.15 2004/02/21 23:15:52 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin at videolan dot org>
......@@ -1132,6 +1132,7 @@ static void Close( vlc_object_t * p_this )
free( p_stream->entry );
free( p_stream );
}
if( p_sys->i_nb_streams ) free( p_sys->pp_streams );
free( p_sys );
}
......@@ -1192,13 +1193,13 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
msg_Dbg( p_mux, "adding input" );
TAB_APPEND( p_sys->i_nb_streams, p_sys->pp_streams, p_stream );
return( VLC_SUCCESS );
return VLC_SUCCESS;
}
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
msg_Dbg( p_mux, "removing input" );
return( 0 );
return VLC_SUCCESS;
}
/****************************************************************************/
......
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