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
241c1192
Commit
241c1192
authored
Nov 23, 2017
by
Karthick J
Committed by
Steven Liu
Nov 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hlsenc: Refactor an inconsistent variable name
parent
f335efc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
hlsenc.c
libavformat/hlsenc.c
+9
-9
No files found.
libavformat/hlsenc.c
View file @
241c1192
...
@@ -1074,7 +1074,7 @@ static int create_master_playlist(AVFormatContext *s,
...
@@ -1074,7 +1074,7 @@ static int create_master_playlist(AVFormatContext *s,
AVDictionary
*
options
=
NULL
;
AVDictionary
*
options
=
NULL
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
int
m3u8_name_size
,
ret
,
bandwidth
;
int
m3u8_name_size
,
ret
,
bandwidth
;
char
*
m3
U
8_rel_name
;
char
*
m3
u
8_rel_name
;
input_vs
->
m3u8_created
=
1
;
input_vs
->
m3u8_created
=
1
;
if
(
!
hls
->
master_m3u8_created
)
{
if
(
!
hls
->
master_m3u8_created
)
{
...
@@ -1108,14 +1108,14 @@ static int create_master_playlist(AVFormatContext *s,
...
@@ -1108,14 +1108,14 @@ static int create_master_playlist(AVFormatContext *s,
vs
=
&
(
hls
->
var_streams
[
i
]);
vs
=
&
(
hls
->
var_streams
[
i
]);
m3u8_name_size
=
strlen
(
vs
->
m3u8_name
)
+
1
;
m3u8_name_size
=
strlen
(
vs
->
m3u8_name
)
+
1
;
m3
U
8_rel_name
=
av_malloc
(
m3u8_name_size
);
m3
u
8_rel_name
=
av_malloc
(
m3u8_name_size
);
if
(
!
m3
U
8_rel_name
)
{
if
(
!
m3
u
8_rel_name
)
{
ret
=
AVERROR
(
ENOMEM
);
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
goto
fail
;
}
}
av_strlcpy
(
m3
U
8_rel_name
,
vs
->
m3u8_name
,
m3u8_name_size
);
av_strlcpy
(
m3
u
8_rel_name
,
vs
->
m3u8_name
,
m3u8_name_size
);
ret
=
get_relative_url
(
hls
->
master_m3u8_url
,
vs
->
m3u8_name
,
ret
=
get_relative_url
(
hls
->
master_m3u8_url
,
vs
->
m3u8_name
,
m3
U
8_rel_name
,
m3u8_name_size
);
m3
u
8_rel_name
,
m3u8_name_size
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unable to find relative URL
\n
"
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unable to find relative URL
\n
"
);
goto
fail
;
goto
fail
;
...
@@ -1145,7 +1145,7 @@ static int create_master_playlist(AVFormatContext *s,
...
@@ -1145,7 +1145,7 @@ static int create_master_playlist(AVFormatContext *s,
if
(
!
bandwidth
)
{
if
(
!
bandwidth
)
{
av_log
(
NULL
,
AV_LOG_WARNING
,
av_log
(
NULL
,
AV_LOG_WARNING
,
"Bandwidth info not available, set audio and video bitrates
\n
"
);
"Bandwidth info not available, set audio and video bitrates
\n
"
);
av_freep
(
&
m3
U
8_rel_name
);
av_freep
(
&
m3
u
8_rel_name
);
continue
;
continue
;
}
}
...
@@ -1153,14 +1153,14 @@ static int create_master_playlist(AVFormatContext *s,
...
@@ -1153,14 +1153,14 @@ static int create_master_playlist(AVFormatContext *s,
if
(
vid_st
&&
vid_st
->
codecpar
->
width
>
0
&&
vid_st
->
codecpar
->
height
>
0
)
if
(
vid_st
&&
vid_st
->
codecpar
->
width
>
0
&&
vid_st
->
codecpar
->
height
>
0
)
avio_printf
(
master_pb
,
",RESOLUTION=%dx%d"
,
vid_st
->
codecpar
->
width
,
avio_printf
(
master_pb
,
",RESOLUTION=%dx%d"
,
vid_st
->
codecpar
->
width
,
vid_st
->
codecpar
->
height
);
vid_st
->
codecpar
->
height
);
avio_printf
(
master_pb
,
"
\n
%s
\n\n
"
,
m3
U
8_rel_name
);
avio_printf
(
master_pb
,
"
\n
%s
\n\n
"
,
m3
u
8_rel_name
);
av_freep
(
&
m3
U
8_rel_name
);
av_freep
(
&
m3
u
8_rel_name
);
}
}
fail:
fail:
if
(
ret
>=
0
)
if
(
ret
>=
0
)
hls
->
master_m3u8_created
=
1
;
hls
->
master_m3u8_created
=
1
;
av_freep
(
&
m3
U
8_rel_name
);
av_freep
(
&
m3
u
8_rel_name
);
ff_format_io_close
(
s
,
&
master_pb
);
ff_format_io_close
(
s
,
&
master_pb
);
return
ret
;
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