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
2f9ca645
Commit
2f9ca645
authored
Dec 26, 2017
by
Aman Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hls: remove repeated http proto_name checks in open_url()
Signed-off-by:
Aman Gupta
<
aman@tmm1.net
>
parent
7e60c743
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
hls.c
libavformat/hls.c
+6
-5
No files found.
libavformat/hls.c
View file @
2f9ca645
...
...
@@ -623,12 +623,13 @@ static int open_url_keepalive(AVFormatContext *s, AVIOContext **pb,
}
static
int
open_url
(
AVFormatContext
*
s
,
AVIOContext
**
pb
,
const
char
*
url
,
AVDictionary
*
opts
,
AVDictionary
*
opts2
,
int
*
is_http
)
AVDictionary
*
opts
,
AVDictionary
*
opts2
,
int
*
is_http
_out
)
{
HLSContext
*
c
=
s
->
priv_data
;
AVDictionary
*
tmp
=
NULL
;
const
char
*
proto_name
=
NULL
;
int
ret
;
int
is_http
=
0
;
av_dict_copy
(
&
tmp
,
opts
,
0
);
av_dict_copy
(
&
tmp
,
opts2
,
0
);
...
...
@@ -654,7 +655,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
return
AVERROR_INVALIDDATA
;
}
}
else
if
(
av_strstart
(
proto_name
,
"http"
,
NULL
))
{
;
is_http
=
1
;
}
else
return
AVERROR_INVALIDDATA
;
...
...
@@ -665,7 +666,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
else
if
(
strcmp
(
proto_name
,
"file"
)
||
!
strncmp
(
url
,
"file,"
,
5
))
return
AVERROR_INVALIDDATA
;
if
(
c
->
http_persistent
&&
*
pb
&&
av_strstart
(
proto_name
,
"http"
,
NULL
)
)
{
if
(
is_http
&&
c
->
http_persistent
&&
*
pb
)
{
ret
=
open_url_keepalive
(
c
->
ctx
,
pb
,
url
);
if
(
ret
==
AVERROR_EXIT
)
{
return
ret
;
...
...
@@ -696,8 +697,8 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
av_dict_free
(
&
tmp
);
if
(
is_http
)
*
is_http
=
av_strstart
(
proto_name
,
"http"
,
NULL
)
;
if
(
is_http
_out
)
*
is_http
_out
=
is_http
;
return
ret
;
}
...
...
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