Try with the full MRL if the access haven't successed with access & url
authorChristophe Mutricy <xtophe@videolan.org>
Sun, 24 Jun 2007 14:51:18 +0000 (14:51 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Sun, 24 Jun 2007 14:51:18 +0000 (14:51 +0000)
src/input/input.c

index dc22761..bcedc2d 100644 (file)
@@ -2198,7 +2198,16 @@ static int InputSourceInit( input_thread_t *p_input,
                                         psz_access, psz_demux, psz_path,
                                         p_input->b_preparsing );
         }
                                         psz_access, psz_demux, psz_path,
                                         p_input->b_preparsing );
         }
-
+        /* access failed, maybe our access detection was wrong.
+         * Retry with the full name */
+        if( in->p_access == NULL && strchr( psz_mrl, ':' ) )
+        {
+            msg_Dbg( p_input, "retrying with access `' demux `' path `%s'",
+                     psz_mrl );
+             in->p_access = access2_New( p_input,
+                                         "", "", psz_mrl,
+                                         p_input->b_preparsing );
+        }
         if( in->p_access == NULL )
         {
             msg_Err( p_input, "open of `%s' failed: %s", psz_mrl,
         if( in->p_access == NULL )
         {
             msg_Err( p_input, "open of `%s' failed: %s", psz_mrl,