[vlc-devel] commit: Preparsing only works with file:// - only try files. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Mar 4 21:21:37 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue Mar 4 22:10:06 2008 +0200| [eb4fd2457952e397cc421ac3160a0385a4d97f4d]
Preparsing only works with file:// - only try files.
Signed-off-by: Rémi Denis-Courmont <rem at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb4fd2457952e397cc421ac3160a0385a4d97f4d
---
src/input/input.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index e8da57f..a8b701c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2181,13 +2181,12 @@ static int InputSourceInit( input_thread_t *p_input,
if( !p_input ) return VLC_EGENERIC;
/* Split uri */
+ MRLSplit( psz_dup, &psz_access, &psz_demux, &psz_path );
+
+ msg_Dbg( p_input, "`%s' gives access `%s' demux `%s' path `%s'",
+ psz_mrl, psz_access, psz_demux, psz_path );
if( !p_input->b_preparsing )
{
- MRLSplit( psz_dup, &psz_access, &psz_demux, &psz_path );
-
- msg_Dbg( p_input, "`%s' gives access `%s' demux `%s' path `%s'",
- psz_mrl, psz_access, psz_demux, psz_path );
-
/* Hack to allow udp://@:port syntax */
if( !psz_access ||
(strncmp( psz_access, "udp", 3 ) &&
@@ -2227,12 +2226,14 @@ static int InputSourceInit( input_thread_t *p_input,
}
else
{
- psz_path = psz_dup;
- if( !strncmp( psz_path, "file://", 7 ) )
- psz_path += 7;
+ /* Preparsing is only for file:// */
+ if( psz_demux && *psz_demux )
+ goto error;
+ if( !psz_access || !*psz_access ) /* path without scheme:// */
+ psz_access = "file";
+ if( strcmp( psz_access, "file" ) )
+ goto error;
msg_Dbg( p_input, "trying to pre-parse %s", psz_path );
- psz_demux = "";
- psz_access = "file";
}
if( in->p_demux )
More information about the vlc-devel
mailing list