Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
80bc1fe2
Commit
80bc1fe2
authored
Sep 02, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: add full URL/MRL in access_t
parent
80d089e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
include/vlc_access.h
include/vlc_access.h
+4
-3
src/input/access.c
src/input/access.c
+11
-9
No files found.
include/vlc_access.h
View file @
80bc1fe2
...
...
@@ -78,9 +78,10 @@ struct access_t
/* Module properties */
module_t
*
p_module
;
/* Access name (empty if non forced) */
char
*
psz_access
;
char
*
psz_location
;
/**< Location (URL with the scheme stripped) */
char
*
psz_access
;
/**< Access name (empty if non forced) */
char
*
psz_url
;
/**< Full URL or MRL */
const
char
*
psz_location
;
/**< Location (URL with the scheme stripped) */
char
*
psz_filepath
;
/**< Local file path (if applicable) */
/* pf_read/pf_block/pf_readdir is used to read data.
...
...
src/input/access.c
View file @
80bc1fe2
...
...
@@ -66,11 +66,11 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
access_t
*
access
=
vlc_custom_create
(
parent
,
sizeof
(
*
access
),
"access"
);
char
*
scheme
=
strndup
(
mrl
,
p
-
mrl
);
char
*
location
=
strdup
(
p
+
3
);
char
*
url
=
strdup
(
mrl
);
if
(
unlikely
(
access
==
NULL
||
scheme
==
NULL
||
location
==
NULL
))
if
(
unlikely
(
access
==
NULL
||
scheme
==
NULL
||
url
==
NULL
))
{
free
(
location
);
free
(
url
);
free
(
scheme
);
vlc_object_release
(
access
);
return
NULL
;
...
...
@@ -78,8 +78,9 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
access
->
p_input
=
input
;
access
->
psz_access
=
scheme
;
access
->
psz_location
=
location
;
access
->
psz_filepath
=
get_path
(
location
);
access
->
psz_url
=
url
;
access
->
psz_location
=
url
+
(
p
+
3
-
mrl
);
access
->
psz_filepath
=
get_path
(
access
->
psz_location
);
access
->
pf_read
=
NULL
;
access
->
pf_block
=
NULL
;
access
->
pf_readdir
=
NULL
;
...
...
@@ -89,13 +90,14 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
access_InitFields
(
access
);
msg_Dbg
(
access
,
"creating access '%s' location='%s', path='%s'"
,
scheme
,
location
,
access
->
psz_filepath
?
access
->
psz_filepath
:
"(null)"
);
access
->
psz_location
,
access
->
psz_filepath
?
access
->
psz_filepath
:
"(null)"
);
access
->
p_module
=
module_need
(
access
,
"access"
,
scheme
,
true
);
if
(
access
->
p_module
==
NULL
)
{
free
(
access
->
psz_filepath
);
free
(
access
->
psz_
location
);
free
(
access
->
psz_
url
);
free
(
access
->
psz_access
);
vlc_object_release
(
access
);
access
=
NULL
;
...
...
@@ -113,9 +115,9 @@ void vlc_access_Delete(access_t *access)
{
module_unneed
(
access
,
access
->
p_module
);
free
(
access
->
psz_access
);
free
(
access
->
psz_location
);
free
(
access
->
psz_filepath
);
free
(
access
->
psz_url
);
free
(
access
->
psz_access
);
vlc_object_release
(
access
);
}
...
...
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