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
606879ec
Commit
606879ec
authored
Sep 04, 2018
by
Karthick Jeyapal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dashenc: Add CODECS tag to HLS master playlist
parent
492b312d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
dashenc.c
libavformat/dashenc.c
+12
-1
No files found.
libavformat/dashenc.c
View file @
606879ec
...
...
@@ -864,6 +864,7 @@ static int write_manifest(AVFormatContext *s, int final)
if
(
c
->
hls_playlist
&&
!
c
->
master_playlist_created
)
{
char
filename_hls
[
1024
];
const
char
*
audio_group
=
"A1"
;
char
audio_codec_str
[
128
]
=
"
\0
"
;
int
is_default
=
1
;
int
max_audio_bitrate
=
0
;
...
...
@@ -895,21 +896,31 @@ static int write_manifest(AVFormatContext *s, int final)
playlist_file
,
i
,
is_default
);
max_audio_bitrate
=
FFMAX
(
st
->
codecpar
->
bit_rate
+
os
->
muxer_overhead
,
max_audio_bitrate
);
if
(
!
av_strnstr
(
audio_codec_str
,
os
->
codec_str
,
sizeof
(
audio_codec_str
)))
{
if
(
strlen
(
audio_codec_str
))
av_strlcat
(
audio_codec_str
,
","
,
sizeof
(
audio_codec_str
));
av_strlcat
(
audio_codec_str
,
os
->
codec_str
,
sizeof
(
audio_codec_str
));
}
is_default
=
0
;
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
char
playlist_file
[
64
];
char
codec_str
[
128
];
AVStream
*
st
=
s
->
streams
[
i
];
OutputStream
*
os
=
&
c
->
streams
[
i
];
char
*
agroup
=
NULL
;
int
stream_bitrate
=
st
->
codecpar
->
bit_rate
+
os
->
muxer_overhead
;
av_strlcpy
(
codec_str
,
os
->
codec_str
,
sizeof
(
codec_str
));
if
((
st
->
codecpar
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
&&
max_audio_bitrate
)
{
agroup
=
(
char
*
)
audio_group
;
stream_bitrate
+=
max_audio_bitrate
;
av_strlcat
(
codec_str
,
","
,
sizeof
(
codec_str
));
av_strlcat
(
codec_str
,
audio_codec_str
,
sizeof
(
codec_str
));
}
get_hls_playlist_name
(
playlist_file
,
sizeof
(
playlist_file
),
NULL
,
i
);
ff_hls_write_stream_info
(
st
,
out
,
stream_bitrate
,
playlist_file
,
agroup
,
NULL
,
NULL
);
ff_hls_write_stream_info
(
st
,
out
,
stream_bitrate
,
playlist_file
,
agroup
,
codec_str
,
NULL
);
}
avio_close
(
out
);
if
(
use_rename
)
...
...
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