[vlc-devel] commit: Access: remove special case for "-" (standard input) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Jan 16 16:45:32 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 16 17:44:07 2010 +0200| [f5ffcbe5b993e9d13b6f8e86757b64f322d5bcd6] | committer: Rémi Denis-Courmont
Access: remove special case for "-" (standard input)
"-" is now converted to "fd://0" by the input code. And file:///- really
means /- (which is a valid file name).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5ffcbe5b993e9d13b6f8e86757b64f322d5bcd6
---
modules/access/dvdnav.c | 3 ---
modules/access/file.c | 2 --
modules/access/mmap.c | 9 ++-------
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 3fb79f2..82dedfb 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1367,9 +1367,6 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
return VLC_SUCCESS;
}
- if( !strcmp( psz_name, "-" ) ) /* stdin -> file access */
- return VLC_EGENERIC;
-
if( (i_fd = utf8_open( psz_name, O_RDONLY |O_NONBLOCK )) == -1 )
{
return VLC_SUCCESS; /* Let dvdnav_open() do the probing */
diff --git a/modules/access/file.c b/modules/access/file.c
index de42c39..bd166c7 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -140,8 +140,6 @@ int Open( vlc_object_t *p_this )
if (!strcasecmp (p_access->psz_access, "fd"))
fd = dup (atoi (path));
- else if (!strcmp (path, "-"))
- fd = dup (0);
else
{
msg_Dbg (p_access, "opening file `%s'", path);
diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index 0609242..2bad6f2 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -93,13 +93,8 @@ static int Open (vlc_object_t *p_this)
STANDARD_BLOCK_ACCESS_INIT;
- if (!strcmp (p_access->psz_path, "-"))
- fd = dup (0);
- else
- {
- msg_Dbg (p_access, "opening file %s", path);
- fd = utf8_open (path, O_RDONLY | O_NOCTTY);
- }
+ msg_Dbg (p_access, "opening file %s", path);
+ fd = utf8_open (path, O_RDONLY | O_NOCTTY);
if (fd == -1)
{
More information about the vlc-devel
mailing list