/*****************************************************************************
* subtitle.c: Demux for subtitle text files.
*****************************************************************************
- * Copyright (C) 1999-2004 VideoLAN
+ * Copyright (C) 1999-2004 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
if( p_sys->i_type == SUB_TYPE_UNKNOWN )
{
msg_Err( p_demux, "failed to recognize subtitle type" );
+ free( p_sys );
return VLC_EGENERIC;
}
sizeof(subtitle_t) * i_max ) ) )
{
msg_Err( p_demux, "out of memory");
+ if( p_sys->subtitle != NULL )
+ free( p_sys->subtitle );
+ TextUnload( &p_sys->txt );
+ free( p_sys );
return VLC_ENOMEM;
}
}