Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthick Jeyapal <kjeyapal@akamai.com>2018-01-19 12:03:09 +0300
committerSteven Liu <lq@chinaffmpeg.org>2018-01-19 12:03:09 +0300
commit0afa171f25bc9b613a77328182e54d6e781269d3 (patch)
treed9fa30438b65d862e5f623afbc92448fa61181c0 /libavformat/hlsplaylist.c
parent381a4820c64ba2d1b3ddc3a50147961f1d8c5848 (diff)
avformat/hlsenc: Add CODECS attribute to master playlist
Diffstat (limited to 'libavformat/hlsplaylist.c')
-rw-r--r--libavformat/hlsplaylist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/hlsplaylist.c b/libavformat/hlsplaylist.c
index 098dc89170..b8a3a14090 100644
--- a/libavformat/hlsplaylist.c
+++ b/libavformat/hlsplaylist.c
@@ -46,7 +46,8 @@ void ff_hls_write_audio_rendition(AVIOContext *out, char *agroup,
}
void ff_hls_write_stream_info(AVStream *st, AVIOContext *out,
- int bandwidth, char *filename, char *agroup) {
+ int bandwidth, char *filename, char *agroup,
+ char *codecs) {
if (!out || !filename)
return;
@@ -60,6 +61,8 @@ void ff_hls_write_stream_info(AVStream *st, AVIOContext *out,
if (st && st->codecpar->width > 0 && st->codecpar->height > 0)
avio_printf(out, ",RESOLUTION=%dx%d", st->codecpar->width,
st->codecpar->height);
+ if (codecs && strlen(codecs) > 0)
+ avio_printf(out, ",CODECS=\"%s\"", codecs);
if (agroup && strlen(agroup) > 0)
avio_printf(out, ",AUDIO=\"group_%s\"", agroup);
avio_printf(out, "\n%s\n\n", filename);