Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
c6ab35db
Commit
c6ab35db
authored
Jan 16, 2010
by
Rémi Denis-Courmont
Browse files
file: handle
fd://<fd
>/<path>
parent
f5ffcbe5
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/file.c
View file @
c6ab35db
...
...
@@ -73,6 +73,7 @@
#endif
#include
<vlc_charset.h>
#include
<vlc_url.h>
struct
access_sys_t
{
...
...
@@ -139,7 +140,25 @@ int Open( vlc_object_t *p_this )
int
fd
=
-
1
;
if
(
!
strcasecmp
(
p_access
->
psz_access
,
"fd"
))
fd
=
dup
(
atoi
(
path
));
{
char
*
end
;
int
oldfd
=
strtol
(
path
,
&
end
,
10
);
if
(
*
end
==
'\0'
)
fd
=
dup
(
oldfd
);
#ifdef HAVE_FDOPENDIR
else
if
(
*
end
==
'/'
&&
end
>
path
)
{
char
*
name
=
decode_URI_duplicate
(
end
-
1
);
if
(
name
!=
NULL
)
/* TODO: ToLocale(), FD_CLOEXEC */
{
name
[
0
]
=
'.'
;
fd
=
openat
(
oldfd
,
name
,
O_RDONLY
|
O_NONBLOCK
);
free
(
name
);
}
}
#endif
}
else
{
msg_Dbg
(
p_access
,
"opening file `%s'"
,
path
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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