p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
+ if( !p_sys )
+ return VLC_ENOMEM;
p_sys->psz_header = NULL;
p_sys->i_subtitle = 0;
p_sys->i_subtitles = 0;
}
if( !p_detect->fmt )
{
- msg_Err( p_demux, "detected %s subtitle format, no asa support" );
+ msg_Err( p_demux, "detected %s subtitle format, no asa support", p_detect->name );
free( p_sys );
return VLC_EGENERIC;
}
p_data = malloc( i_ssize );
if( !p_data )
{
- msg_Err( p_demux, "out of memory");
free( p_sys );
return VLC_ENOMEM;
}
subtitle_t *p_subtitle;
char *psz_text;
+ VLC_UNUSED(p_arg);
+
if( p_sys->i_subtitles >= p_sys->i_subs_alloc )
{
p_sys->i_subs_alloc += 500;
if( !( p_sys->subtitle = realloc( p_sys->subtitle, sizeof(subtitle_t)
* p_sys->i_subs_alloc ) ) )
{
- msg_Err( p_demux, "out of memory");
return VLC_ENOMEM;
}
}