Commit f7affc6f authored by Jian Yang's avatar Jian Yang Committed by Karthick Jeyapal

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.
parent 681aa7d1
...@@ -911,8 +911,10 @@ static int write_manifest(AVFormatContext *s, int final) ...@@ -911,8 +911,10 @@ static int write_manifest(AVFormatContext *s, int final)
OutputStream *os = &c->streams[i]; OutputStream *os = &c->streams[i];
char *agroup = NULL; char *agroup = NULL;
int stream_bitrate = st->codecpar->bit_rate + os->muxer_overhead; 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)); 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; agroup = (char *)audio_group;
stream_bitrate += max_audio_bitrate; stream_bitrate += max_audio_bitrate;
av_strlcat(codec_str, ",", sizeof(codec_str)); av_strlcat(codec_str, ",", sizeof(codec_str));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment