Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b1af0e23
Commit
b1af0e23
authored
Feb 01, 2018
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hls: store referer message in HLS http request
Signed-off-by:
Steven Liu
<
lq@chinaffmpeg.org
>
parent
44f34306
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
hls.c
libavformat/hls.c
+3
-1
No files found.
libavformat/hls.c
View file @
b1af0e23
...
@@ -202,6 +202,7 @@ typedef struct HLSContext {
...
@@ -202,6 +202,7 @@ typedef struct HLSContext {
int64_t
first_timestamp
;
int64_t
first_timestamp
;
int64_t
cur_timestamp
;
int64_t
cur_timestamp
;
AVIOInterruptCB
*
interrupt_callback
;
AVIOInterruptCB
*
interrupt_callback
;
char
*
referer
;
///< holds HTTP referer set as an AVOption to the HTTP protocol context
char
*
user_agent
;
///< holds HTTP user agent set as an AVOption to the HTTP protocol context
char
*
user_agent
;
///< holds HTTP user agent set as an AVOption to the HTTP protocol context
char
*
cookies
;
///< holds HTTP cookie values set in either the initial response or as an AVOption to the HTTP protocol context
char
*
cookies
;
///< holds HTTP cookie values set in either the initial response or as an AVOption to the HTTP protocol context
char
*
headers
;
///< holds HTTP headers set as an AVOption to the HTTP protocol context
char
*
headers
;
///< holds HTTP headers set as an AVOption to the HTTP protocol context
...
@@ -1184,6 +1185,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg,
...
@@ -1184,6 +1185,7 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg,
// broker prior HTTP options that should be consistent across requests
// broker prior HTTP options that should be consistent across requests
av_dict_set
(
&
opts
,
"user_agent"
,
c
->
user_agent
,
0
);
av_dict_set
(
&
opts
,
"user_agent"
,
c
->
user_agent
,
0
);
av_dict_set
(
&
opts
,
"referer"
,
c
->
referer
,
0
);
av_dict_set
(
&
opts
,
"cookies"
,
c
->
cookies
,
0
);
av_dict_set
(
&
opts
,
"cookies"
,
c
->
cookies
,
0
);
av_dict_set
(
&
opts
,
"headers"
,
c
->
headers
,
0
);
av_dict_set
(
&
opts
,
"headers"
,
c
->
headers
,
0
);
av_dict_set
(
&
opts
,
"http_proxy"
,
c
->
http_proxy
,
0
);
av_dict_set
(
&
opts
,
"http_proxy"
,
c
->
http_proxy
,
0
);
...
@@ -1658,7 +1660,7 @@ static int save_avio_options(AVFormatContext *s)
...
@@ -1658,7 +1660,7 @@ static int save_avio_options(AVFormatContext *s)
{
{
HLSContext
*
c
=
s
->
priv_data
;
HLSContext
*
c
=
s
->
priv_data
;
static
const
char
*
const
opts
[]
=
{
static
const
char
*
const
opts
[]
=
{
"headers"
,
"http_proxy"
,
"user_agent"
,
"user-agent"
,
"cookies"
,
NULL
};
"headers"
,
"http_proxy"
,
"user_agent"
,
"user-agent"
,
"cookies"
,
"referer"
,
NULL
};
const
char
*
const
*
opt
=
opts
;
const
char
*
const
*
opt
=
opts
;
uint8_t
*
buf
;
uint8_t
*
buf
;
int
ret
=
0
;
int
ret
=
0
;
...
...
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