demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
char *ext;
- int i;
+ int i = 0;
vlc_value_t val;
/* We accept file based on extention match */
if( !p_demux->b_force )
{
- if( ( ext = strrchr( p_demux->psz_path, '.' ) ) == NULL ||
+ if( p_demux->psz_file == NULL
+ || ( ext = strrchr( p_demux->psz_file, '.' ) ) == NULL ||
stream_Size( p_demux->s ) == 0 ) return VLC_EGENERIC;
ext++; /* skip . */