]> git.sesse.net Git - vlc/blobdiff - modules/demux/gme.cpp
avformat: fix non-file usage after [1644d683e9df]
[vlc] / modules / demux / gme.cpp
index 427e2963b674dc257d9d56fad5c3c46f71f963e0..dcd213f73ebece167e5aad257bb6798e2f89542a 100644 (file)
@@ -115,13 +115,14 @@ static int Open( vlc_object_t *p_this )
     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 . */