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
eae2d89b
Commit
eae2d89b
authored
Mar 14, 2016
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hls: handle crypto in the protocol checks
Fixes issue 5248
parent
0d4b8a2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
hls.c
libavformat/hls.c
+11
-1
No files found.
libavformat/hls.c
View file @
eae2d89b
...
@@ -594,12 +594,20 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
...
@@ -594,12 +594,20 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
{
{
HLSContext
*
c
=
s
->
priv_data
;
HLSContext
*
c
=
s
->
priv_data
;
AVDictionary
*
tmp
=
NULL
;
AVDictionary
*
tmp
=
NULL
;
const
char
*
proto_name
=
avio_find_protocol_name
(
url
)
;
const
char
*
proto_name
=
NULL
;
int
ret
;
int
ret
;
av_dict_copy
(
&
tmp
,
opts
,
0
);
av_dict_copy
(
&
tmp
,
opts
,
0
);
av_dict_copy
(
&
tmp
,
opts2
,
0
);
av_dict_copy
(
&
tmp
,
opts2
,
0
);
if
(
av_strstart
(
url
,
"crypto"
,
NULL
))
{
if
(
url
[
6
]
==
'+'
||
url
[
6
]
==
':'
)
proto_name
=
avio_find_protocol_name
(
url
+
7
);
}
if
(
!
proto_name
)
proto_name
=
avio_find_protocol_name
(
url
);
if
(
!
proto_name
)
if
(
!
proto_name
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
@@ -608,6 +616,8 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
...
@@ -608,6 +616,8 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
(
!
strncmp
(
proto_name
,
url
,
strlen
(
proto_name
))
&&
url
[
strlen
(
proto_name
)]
==
':'
)
if
(
!
strncmp
(
proto_name
,
url
,
strlen
(
proto_name
))
&&
url
[
strlen
(
proto_name
)]
==
':'
)
;
;
else
if
(
av_strstart
(
url
,
"crypto"
,
NULL
)
&&
!
strncmp
(
proto_name
,
url
+
7
,
strlen
(
proto_name
))
&&
url
[
7
+
strlen
(
proto_name
)]
==
':'
)
;
else
if
(
strcmp
(
proto_name
,
"file"
)
||
!
strncmp
(
url
,
"file,"
,
5
))
else
if
(
strcmp
(
proto_name
,
"file"
)
||
!
strncmp
(
url
,
"file,"
,
5
))
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
...
...
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