avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for Audio

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Dave Johansen
2023-10-26 19:43:59 -06:00
committed by Steven Liu
parent 9bcbe04aa0
commit 39878fc504
4 changed files with 14 additions and 4 deletions

View File

@@ -1284,7 +1284,8 @@ static int write_manifest(AVFormatContext *s, int final)
continue;
get_hls_playlist_name(playlist_file, sizeof(playlist_file), NULL, i);
ff_hls_write_audio_rendition(c->m3u8_out, audio_group,
playlist_file, NULL, i, is_default);
playlist_file, NULL, i, is_default,
s->streams[i]->codecpar->ch_layout.nb_channels);
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))) {