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
52623bc2
Commit
52623bc2
authored
Apr 09, 2018
by
Jun Zhao
Committed by
Jun Zhao
Apr 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/hlsproto: use ff_get_chomp_line
Signed-off-by:
Jun Zhao
<
mypopydev@gmail.com
>
parent
f1ccb4db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
hlsproto.c
libavformat/hlsproto.c
+2
-10
No files found.
libavformat/hlsproto.c
View file @
52623bc2
...
@@ -69,14 +69,6 @@ typedef struct HLSContext {
...
@@ -69,14 +69,6 @@ typedef struct HLSContext {
int64_t
last_load_time
;
int64_t
last_load_time
;
}
HLSContext
;
}
HLSContext
;
static
int
read_chomp_line
(
AVIOContext
*
s
,
char
*
buf
,
int
maxlen
)
{
int
len
=
ff_get_line
(
s
,
buf
,
maxlen
);
while
(
len
>
0
&&
av_isspace
(
buf
[
len
-
1
]))
buf
[
--
len
]
=
'\0'
;
return
len
;
}
static
void
free_segment_list
(
HLSContext
*
s
)
static
void
free_segment_list
(
HLSContext
*
s
)
{
{
int
i
;
int
i
;
...
@@ -122,7 +114,7 @@ static int parse_playlist(URLContext *h, const char *url)
...
@@ -122,7 +114,7 @@ static int parse_playlist(URLContext *h, const char *url)
h
->
protocol_whitelist
,
h
->
protocol_blacklist
))
<
0
)
h
->
protocol_whitelist
,
h
->
protocol_blacklist
))
<
0
)
return
ret
;
return
ret
;
read
_chomp_line
(
in
,
line
,
sizeof
(
line
));
ff_get
_chomp_line
(
in
,
line
,
sizeof
(
line
));
if
(
strcmp
(
line
,
"#EXTM3U"
))
{
if
(
strcmp
(
line
,
"#EXTM3U"
))
{
ret
=
AVERROR_INVALIDDATA
;
ret
=
AVERROR_INVALIDDATA
;
goto
fail
;
goto
fail
;
...
@@ -131,7 +123,7 @@ static int parse_playlist(URLContext *h, const char *url)
...
@@ -131,7 +123,7 @@ static int parse_playlist(URLContext *h, const char *url)
free_segment_list
(
s
);
free_segment_list
(
s
);
s
->
finished
=
0
;
s
->
finished
=
0
;
while
(
!
avio_feof
(
in
))
{
while
(
!
avio_feof
(
in
))
{
read
_chomp_line
(
in
,
line
,
sizeof
(
line
));
ff_get
_chomp_line
(
in
,
line
,
sizeof
(
line
));
if
(
av_strstart
(
line
,
"#EXT-X-STREAM-INF:"
,
&
ptr
))
{
if
(
av_strstart
(
line
,
"#EXT-X-STREAM-INF:"
,
&
ptr
))
{
struct
variant_info
info
=
{{
0
}};
struct
variant_info
info
=
{{
0
}};
is_variant
=
1
;
is_variant
=
1
;
...
...
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