+ if( *p_demux->psz_access != '\0' )
+ {
+ /* if an access is provided, then it has to be "fake" */
+ if( strcmp( p_demux->psz_access, "fake" ) )
+ return VLC_EGENERIC;
+
+ msg_Dbg( p_demux, "fake:// access_demux detected" );
+ }
+ else
+ {
+ /**
+ * access is not provided,
+ * then let's see if path could be an image
+ **/
+
+ if( !p_demux->psz_path || !*p_demux->psz_path )
+ return VLC_EGENERIC;
+
+ vlc_fourcc_t i_codec = image_Ext2Fourcc( p_demux->psz_path );
+ if( !i_codec )
+ return VLC_EGENERIC;
+ msg_Dbg( p_demux, "still image detected with codec format %4.4s",
+ (const char*)&i_codec );
+ }
+
+ if( p_demux->psz_path && *p_demux->psz_path )
+ {
+ /* set up fake-file on the fly */
+ var_Create( p_demux->p_parent, "fake-file", VLC_VAR_STRING );
+ var_SetString( p_demux->p_parent, "fake-file", p_demux->psz_path );
+ }