diff options
author | Jian Yang <yangjian0911@gmail.com> | 2018-09-14 15:08:17 +0800 |
---|---|---|
committer | Karthick Jeyapal <kjeyapal@akamai.com> | 2018-10-11 12:46:31 +0530 |
commit | f7affc6f70cc1bbeec51b1d699e2f17f4ced7362 (patch) | |
tree | d532c242c3d9247bafebb7cbe4b4a5a5c9ed823a | |
parent | 681aa7d14f97fd98181ca6d61e11be48fe65692d (diff) | |
download | ffmpeg-f7affc6f70cc1bbeec51b1d699e2f17f4ced7362.tar.gz |
avformat/dashenc: only write video streams into HLS master playlist
Tool mediastreamvalidator reports error "Variant media_[N].m3u8 is
missing audio group" for audio streams in HLS master playlist. As audio
streams are already listed in audio group, skip them as variant media
streams in master playlist.
-rw-r--r-- | libavformat/dashenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index b0bb35426b..26a4dcea60 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -911,8 +911,10 @@ static int write_manifest(AVFormatContext *s, int final) OutputStream *os = &c->streams[i]; char *agroup = NULL; int stream_bitrate = st->codecpar->bit_rate + os->muxer_overhead; + if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) + continue; av_strlcpy(codec_str, os->codec_str, sizeof(codec_str)); - if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) && max_audio_bitrate) { + if (max_audio_bitrate) { agroup = (char *)audio_group; stream_bitrate += max_audio_bitrate; av_strlcat(codec_str, ",", sizeof(codec_str)); |