diff options
author | Dave Johansen <davejohansen@gmail.com> | 2023-10-26 19:43:59 -0600 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2023-11-12 16:44:47 +0800 |
commit | 39878fc50400f347075f75d1a0cbb77b16fb9c9d (patch) | |
tree | 0946e81de17b9e997a3dcbbcf82d3ac6c7f6413c /libavformat/hlsplaylist.c | |
parent | 9bcbe04aa0abb6b09b687f6e63c391b13503ffff (diff) | |
download | ffmpeg-39878fc50400f347075f75d1a0cbb77b16fb9c9d.tar.gz |
avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
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 2bf05f3c7c..4f35d0388f 100644 --- a/libavformat/hlsplaylist.c +++ b/libavformat/hlsplaylist.c @@ -39,7 +39,7 @@ void ff_hls_write_playlist_version(AVIOContext *out, int version) void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, const char *filename, const char *language, - int name_id, int is_default) + int name_id, int is_default, int nb_channels) { if (!out || !agroup || !filename) return; @@ -49,6 +49,9 @@ void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, if (language) { avio_printf(out, "LANGUAGE=\"%s\",", language); } + if (nb_channels) { + avio_printf(out, "CHANNELS=\"%d\",", nb_channels); + } avio_printf(out, "URI=\"%s\"\n", filename); } |