Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
7ba4c386
Commit
7ba4c386
authored
Nov 06, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input location is always an URL
parent
8e1c86a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
33 deletions
+28
-33
src/input/input.c
src/input/input.c
+28
-33
No files found.
src/input/input.c
View file @
7ba4c386
...
...
@@ -2380,8 +2380,6 @@ static int InputSourceInit( input_thread_t *p_input,
/* Preparsing is only for file:// */
if
(
*
psz_demux
)
goto
error
;
if
(
!*
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
);
...
...
@@ -2996,52 +2994,49 @@ static void input_ChangeState( input_thread_t *p_input, int i_state )
void
input_SplitMRL
(
const
char
**
ppsz_access
,
const
char
**
ppsz_demux
,
char
**
ppsz_path
,
char
*
psz_dup
)
{
const
char
*
psz_access
;
const
char
*
psz_demux
=
""
;
char
*
psz_path
;
char
*
p
;
/* Either there is an access/demux specification before ://
* or we have a plain local file path. */
psz_path
=
strstr
(
psz_dup
,
"://"
);
if
(
psz_path
!=
NULL
)
/* Separate <path> from <access>[/<demux>]:// */
p
=
strstr
(
psz_dup
,
"://"
);
if
(
p
!=
NULL
)
{
*
psz_path
=
'\0'
;
psz_path
+=
3
;
/* skips "://" */
psz_access
=
psz_dup
;
/* We really don't want module name substitution here! */
if
(
psz_access
[
0
]
==
'$'
)
psz_access
++
;
/* Separate access from demux (<access>/<demux>://<path>) */
char
*
p
=
strchr
(
psz_access
,
'/'
);
if
(
p
)
{
*
p
=
'\0'
;
psz_demux
=
p
+
1
;
if
(
psz_demux
[
0
]
==
'$'
)
psz_demux
++
;
}
*
p
=
'\0'
;
p
+=
3
;
/* skips "://" */
*
ppsz_path
=
p
;
/* Remove HTML anchor if present (not supported).
* The hash symbol itself should be URI-encoded. */
p
=
strchr
(
p
sz_path
,
'#'
);
p
=
strchr
(
p
,
'#'
);
if
(
p
)
*
p
=
'\0'
;
}
else
{
#ifndef NDEBUG
fprintf
(
stderr
,
"%s(
\"
%s
\"
)
:
not a valid URI!
\n
"
,
__func__
,
fprintf
(
stderr
,
"%s(
\"
%s
\"
)
probably
not a valid URI!
\n
"
,
__func__
,
psz_dup
);
#endif
psz_path
=
psz_dup
;
psz_access
=
""
;
/* Note: this is a valid non const pointer to "": */
*
ppsz_path
=
psz_dup
+
strlen
(
psz_dup
);
}
/* Separate access from demux */
p
=
strchr
(
psz_dup
,
'/'
);
if
(
p
!=
NULL
)
{
*
(
p
++
)
=
'\0'
;
if
(
p
[
0
]
==
'$'
)
p
++
;
*
ppsz_demux
=
p
;
}
else
*
ppsz_demux
=
""
;
*
ppsz_access
=
psz_access
;
*
ppsz_demux
=
psz_demux
;
*
ppsz_path
=
psz_path
;
/* We really don't want module name substitution here! */
p
=
psz_dup
;
if
(
p
[
0
]
==
'$'
)
p
++
;
*
ppsz_access
=
p
;
}
static
inline
bool
next
(
char
**
src
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment