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
0e526022
Commit
0e526022
authored
Dec 12, 2017
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hlsenc: reindent after previous commits
parent
555119bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
hlsenc.c
libavformat/hlsenc.c
+30
-30
No files found.
libavformat/hlsenc.c
View file @
0e526022
...
...
@@ -1646,40 +1646,40 @@ static int hls_write_header(AVFormatContext *s)
for
(
i
=
0
;
i
<
hls
->
nb_varstreams
;
i
++
)
{
vs
=
&
hls
->
var_streams
[
i
];
av_dict_copy
(
&
options
,
hls
->
format_options
,
0
);
ret
=
avformat_write_header
(
vs
->
avf
,
&
options
);
if
(
av_dict_count
(
options
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Some of provided format options in '%s' are not recognized
\n
"
,
hls
->
format_options_str
);
ret
=
AVERROR
(
EINVAL
);
av_dict_copy
(
&
options
,
hls
->
format_options
,
0
);
ret
=
avformat_write_header
(
vs
->
avf
,
&
options
);
if
(
av_dict_count
(
options
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Some of provided format options in '%s' are not recognized
\n
"
,
hls
->
format_options_str
);
ret
=
AVERROR
(
EINVAL
);
av_dict_free
(
&
options
);
goto
fail
;
}
av_dict_free
(
&
options
);
goto
fail
;
}
av_dict_free
(
&
options
);
//av_assert0(s->nb_streams == hls->avf->nb_streams);
for
(
j
=
0
;
j
<
vs
->
nb_streams
;
j
++
)
{
AVStream
*
inner_st
;
AVStream
*
outer_st
=
vs
->
streams
[
j
];
if
(
hls
->
max_seg_size
>
0
)
{
if
((
outer_st
->
codecpar
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
&&
(
outer_st
->
codecpar
->
bit_rate
>
hls
->
max_seg_size
))
{
av_log
(
s
,
AV_LOG_WARNING
,
"Your video bitrate is bigger than hls_segment_size, "
"(%"
PRId64
" > %"
PRId64
"), the result maybe not be what you want."
,
outer_st
->
codecpar
->
bit_rate
,
hls
->
max_seg_size
);
//av_assert0(s->nb_streams == hls->avf->nb_streams);
for
(
j
=
0
;
j
<
vs
->
nb_streams
;
j
++
)
{
AVStream
*
inner_st
;
AVStream
*
outer_st
=
vs
->
streams
[
j
];
if
(
hls
->
max_seg_size
>
0
)
{
if
((
outer_st
->
codecpar
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
&&
(
outer_st
->
codecpar
->
bit_rate
>
hls
->
max_seg_size
))
{
av_log
(
s
,
AV_LOG_WARNING
,
"Your video bitrate is bigger than hls_segment_size, "
"(%"
PRId64
" > %"
PRId64
"), the result maybe not be what you want."
,
outer_st
->
codecpar
->
bit_rate
,
hls
->
max_seg_size
);
}
}
}
if
(
outer_st
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_SUBTITLE
)
inner_st
=
vs
->
avf
->
streams
[
j
];
else
if
(
vs
->
vtt_avf
)
inner_st
=
vs
->
vtt_avf
->
streams
[
0
];
else
{
/* We have a subtitle stream, when the user does not want one */
inner_st
=
NULL
;
continue
;
if
(
outer_st
->
codecpar
->
codec_type
!=
AVMEDIA_TYPE_SUBTITLE
)
inner_st
=
vs
->
avf
->
streams
[
j
];
else
if
(
vs
->
vtt_avf
)
inner_st
=
vs
->
vtt_avf
->
streams
[
0
];
else
{
/* We have a subtitle stream, when the user does not want one */
inner_st
=
NULL
;
continue
;
}
avpriv_set_pts_info
(
outer_st
,
inner_st
->
pts_wrap_bits
,
inner_st
->
time_base
.
num
,
inner_st
->
time_base
.
den
);
}
avpriv_set_pts_info
(
outer_st
,
inner_st
->
pts_wrap_bits
,
inner_st
->
time_base
.
num
,
inner_st
->
time_base
.
den
);
}
}
fail:
...
...
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