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
882422ab
Commit
882422ab
authored
Oct 03, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added User-Agent header in the HTTP input.
* Fixed an input segfault which occured using ES input.
parent
5d011ad3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
+21
-8
include/config.h.in
include/config.h.in
+1
-1
src/input/input.c
src/input/input.c
+9
-4
src/input/input_programs.c
src/input/input_programs.c
+9
-1
src/interface/main.c
src/interface/main.c
+2
-2
No files found.
include/config.h.in
View file @
882422ab
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
/* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
/* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
"Copyright 1996-2001 VideoLAN\n"
"Copyright 1996-2001 VideoLAN\n"
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
" @VLC_CODENAME@ - (C)1996-2001 VideoLAN
\n
"
" @VLC_CODENAME@ - (C)1996-2001 VideoLAN"
#define VERSION "@VLC_VERSION@"
#define VERSION "@VLC_VERSION@"
...
...
src/input/input.c
View file @
882422ab
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* decoders.
* decoders.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.14
0 2001/10/03 13:14:0
5 sam Exp $
* $Id: input.c,v 1.14
1 2001/10/03 15:10:5
5 sam Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -1173,17 +1173,22 @@ static void HTTPOpen( input_thread_t * p_input )
...
@@ -1173,17 +1173,22 @@ static void HTTPOpen( input_thread_t * p_input )
p_input
->
stream
.
b_seekable
=
0
;
p_input
->
stream
.
b_seekable
=
0
;
p_input
->
stream
.
b_pace_control
=
1
;
/* TCP/IP... */
p_input
->
stream
.
b_pace_control
=
1
;
/* TCP/IP... */
# define HTTP_USERAGENT "User-Agent: " COPYRIGHT_MESSAGE "\r\n"
# define HTTP_END "\r\n"
/* Prepare GET ... */
/* Prepare GET ... */
if
(
psz_proxy
!=
NULL
)
if
(
psz_proxy
!=
NULL
)
{
{
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
"GET http://%s:%d/%s HTTP/1.0
\r\n\r\n
"
,
psz_server
,
"GET http://%s:%d/%s HTTP/1.0
\r\n
"
i_port
,
psz_path
);
HTTP_USERAGENT
HTTP_END
,
psz_server
,
i_port
,
psz_path
);
}
}
else
else
{
{
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
"GET /%s HTTP/1.0
\r\n
Host: %s
\r\n\r\n
"
,
"GET /%s HTTP/1.0
\r\n
Host: %s
\r\n
"
HTTP_USERAGENT
HTTP_END
,
psz_path
,
psz_server
);
psz_path
,
psz_server
);
}
}
psz_buffer
[
sizeof
(
psz_buffer
)
-
1
]
=
'\0'
;
psz_buffer
[
sizeof
(
psz_buffer
)
-
1
]
=
'\0'
;
...
...
src/input/input_programs.c
View file @
882422ab
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.6
2 2001/10/02 16:46:59 massiot
Exp $
* $Id: input_programs.c,v 1.6
3 2001/10/03 15:10:55 sam
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -76,6 +76,10 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
...
@@ -76,6 +76,10 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
}
}
memset
(
p_input
->
stream
.
p_demux_data
,
0
,
i_data_len
);
memset
(
p_input
->
stream
.
p_demux_data
,
0
,
i_data_len
);
}
}
else
{
p_input
->
stream
.
p_demux_data
=
NULL
;
}
return
0
;
return
0
;
}
}
...
@@ -191,6 +195,10 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
...
@@ -191,6 +195,10 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
memset
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
,
0
,
memset
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
,
0
,
i_data_len
);
i_data_len
);
}
}
else
{
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
=
NULL
;
}
return
p_input
->
stream
.
pp_programs
[
i_pgrm_index
];
return
p_input
->
stream
.
pp_programs
[
i_pgrm_index
];
}
}
...
...
src/interface/main.c
View file @
882422ab
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* and spawn threads.
* and spawn threads.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.11
6 2001/10/01 16:18:49 massiot
Exp $
* $Id: main.c,v 1.11
7 2001/10/03 15:10:55 sam
Exp $
*
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -304,7 +304,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
...
@@ -304,7 +304,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
return
(
errno
);
return
(
errno
);
}
}
intf_MsgImm
(
COPYRIGHT_MESSAGE
);
intf_MsgImm
(
COPYRIGHT_MESSAGE
"
\n
"
);
/*
/*
* Read configuration
* Read configuration
...
...
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