diff options
author | Karthick Jeyapal <kjeyapal@akamai.com> | 2018-01-19 17:03:09 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2018-01-19 17:03:09 +0800 |
commit | 0afa171f25bc9b613a77328182e54d6e781269d3 (patch) | |
tree | d9fa30438b65d862e5f623afbc92448fa61181c0 /libavformat/hlsplaylist.c | |
parent | 381a4820c64ba2d1b3ddc3a50147961f1d8c5848 (diff) | |
download | ffmpeg-0afa171f25bc9b613a77328182e54d6e781269d3.tar.gz |
avformat/hlsenc: Add CODECS attribute to master playlist
Diffstat (limited to 'libavformat/hlsplaylist.c')
-rw-r--r-- | libavformat/hlsplaylist.c | 5 |
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); |