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
9a51cd35
Commit
9a51cd35
authored
Nov 05, 2016
by
Anssi Hannula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hls: Factor copying stream info to a separate function
Signed-off-by:
Anssi Hannula
<
anssi.hannula@iki.fi
>
parent
34aeb5db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
hls.c
libavformat/hls.c
+11
-7
No files found.
libavformat/hls.c
View file @
9a51cd35
...
...
@@ -1528,6 +1528,16 @@ static void add_stream_to_programs(AVFormatContext *s, struct playlist *pls, AVS
av_dict_set_int
(
&
stream
->
metadata
,
"variant_bitrate"
,
bandwidth
,
0
);
}
static
void
set_stream_info_from_input_stream
(
AVStream
*
st
,
struct
playlist
*
pls
,
AVStream
*
ist
)
{
avcodec_parameters_copy
(
st
->
codecpar
,
ist
->
codecpar
);
if
(
pls
->
is_id3_timestamped
)
/* custom timestamps via id3 */
avpriv_set_pts_info
(
st
,
33
,
1
,
MPEG_TIME_BASE
);
else
avpriv_set_pts_info
(
st
,
ist
->
pts_wrap_bits
,
ist
->
time_base
.
num
,
ist
->
time_base
.
den
);
}
/* add new subdemuxer streams to our context, if any */
static
int
update_streams_from_subdemuxer
(
AVFormatContext
*
s
,
struct
playlist
*
pls
)
{
...
...
@@ -1540,13 +1550,7 @@ static int update_streams_from_subdemuxer(AVFormatContext *s, struct playlist *p
return
AVERROR
(
ENOMEM
);
st
->
id
=
pls
->
index
;
avcodec_parameters_copy
(
st
->
codecpar
,
ist
->
codecpar
);
if
(
pls
->
is_id3_timestamped
)
/* custom timestamps via id3 */
avpriv_set_pts_info
(
st
,
33
,
1
,
MPEG_TIME_BASE
);
else
avpriv_set_pts_info
(
st
,
ist
->
pts_wrap_bits
,
ist
->
time_base
.
num
,
ist
->
time_base
.
den
);
set_stream_info_from_input_stream
(
st
,
pls
,
ist
);
dynarray_add
(
&
pls
->
main_streams
,
&
pls
->
n_main_streams
,
st
);
...
...
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